## Flag = Check_InActive()
## TypeError: Check_InActive() takes exactly 1 argument (0 given)
有人可以帮我解决错误。
ws.protection.sheet = True
答案 0 :(得分:1)
您应该为该功能提供参数,并且您不需要此通话Check_InActive(Policy)
,因为您不会存储结果
Policy = raw_input("Enter Policy Name: ")
Check_InActive(Policy)
Flag = Check_InActive(Policy)
if (Flag in "Inactive"):
print(Policy,"is ",Flag)
答案 1 :(得分:1)
您需要将参数传递给Check_InActive
功能区。你应该这样称呼它:
Policy = raw_input("Enter Policy Name: ")
Flag = Check_InActive(Policy)
if (Flag in "Inactive"):
print(Policy,"is ",Flag)