2024-05-08 00:10:57 发布
网友
我写过:
while file.readline().startswith("#"): continue
但我怀疑continue是不必要的?对于我想要实现的目标,正确的语法是什么?
continue
while file.readline().startswith("#"): pass
它使用pass语句:
The pass statement does nothing. It can be used when a statement is required syntactically but the program requires no action.
http://www.network-theory.co.uk/docs/pytut/passStatements.html
它使用pass语句:
http://www.network-theory.co.uk/docs/pytut/passStatements.html
相关问题 更多 >
编程相关推荐