-9
有人能夠解釋這是什麼意思?請使用簡單的條款,街頭隨機的人可以理解。謝謝這是做什麼用的? - (「-h」,「--help」)中的ArgName [在Python中]
有人能夠解釋這是什麼意思?請使用簡單的條款,街頭隨機的人可以理解。謝謝這是做什麼用的? - (「-h」,「--help」)中的ArgName [在Python中]
嘗試在您的控制檯中測試這些東西...他們是不言自明的。
# 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
好的非常感謝,我想我現在明白了。 – user2574069
你試過尋找答案嗎? –
你嘗試過嗎? – brbcoding
它測試元組中是否包含'ArgName'的值。 –