-10

有人能解释这意味着什么吗?请使用街上随便一个人都能理解的简单术语。谢谢

4

1 回答 1

4

尝试在您的控制台中测试这些东西......它们非常不言自明。

# set a value for ArgName 
>>> ArgName = "-h"
# see if that value is in this tuple
>>> ArgName in ("-h","--help")
True # because ArgName = '-h' which is in the tuple
>>> ArgName = "--help"
>>> ArgName in ("-h","--help")
True # because ArgName = '--help' which is in the tuple
>>> ArgName = "something"
>>> ArgName in ("-h","--help")
False # because ArgName = 'something' which is NOT in the tuple
于 2013-07-11T19:39:55.407 回答