【发布时间】:2021-10-27 03:25:42
【问题描述】:
大家好,我怎样才能让这件事变成 TRUE?我已经存在 .txt 文件,但结果总是 False。
ID = input("Enter the name of your .txt file: ") +".txt" +"'"
IDS = "'" + ID
file_exists = os.path.exists(IDS)
print(file_exists)
print(IDS)
【问题讨论】:
标签: python text operating-system