2024-04-19 02:17:53 发布
网友
下面的命令在python中有效吗?你知道吗
if(os.path.isfile("file path") && os.path.isfile("another file path") )
if os.path.isfile("file path") and os.path.isfile("another file path"): do something
是你问题的正确语法。你知道吗
Is this valid Python?:
否,&;不是有效语法,您需要冒号作为下一个代码块。然而,这将是(而且将是更好的风格):
if os.path.isfile("file path") and os.path.isfile("another file path"): # ...
是你问题的正确语法。你知道吗
否,&;不是有效语法,您需要冒号作为下一个代码块。然而,这将是(而且将是更好的风格):
相关问题 更多 >
编程相关推荐