import os.path
LicencePlate = input("Plate me Bitch")
savePath = "M:\Python\PlatesOffences\"
print(savePath + LicencePlate)
if os.path.exists(savePath + + LicencePlate + ".txt" ) == True:
print("FileFound")`
文件地址所需的反斜杠导致代码忽略引号,在扫描字符串文本错误时返回EOL。我不知道怎么解决这个问题。在
Tags:
\
是字符串文本中的转义字符。它修改随后角色的行为。在您的例子中,它修改了"
的含义,不再表示字符串的结尾。在尝试以下几种方法之一:
相关问题 更多 >
编程相关推荐