Python认为什么是“ true”?

时间:2019-07-17 22:13:41

标签: python if-statement

在if语句中,您显然具有:

if [statement]:
    [Action]

对于“语句”部分,您需要放置在那里以使其不通过,例如,此打印字是否为“ Hello,World!”:

if []:
    print("Hello, World!")

if "Will this pass?":
    print("Hello, World!")

0 个答案:

没有答案