|
1
2
您可以使用try-except方法。
此外,你可以 尝试 使用check_output(),但我不知道写线是否可以使用它。 |
![]() |
2
1
writeLines没有任何返回值,因此在if语句中使用时没有任何值:) https://python-reference.readthedocs.io/en/latest/docs/file/writelines.html |