2013-07-11 35 views

回答

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 
+0

好的非常感謝,我想我現在明白了。 – user2574069