“打印”;C:\Users>&引用;用python
我有以下代码:“打印”;C:\Users>&引用;用python,python,Python,我有以下代码: print("C:\Users>") 我想让python打印C:\Users>,但我得到了以下错误: SyntaxError: EOL while scanning string literal 现在,我想问题是python正试图到达我计算机上的位置。 我如何避免它 我正在使用python 3.7尝试运行: print(r"C:\Users>") # this will make it a raw string, so it
print("C:\Users>")
我想让python打印C:\Users>,但我得到了以下错误:
SyntaxError: EOL while scanning string literal
现在,我想问题是python正试图到达我计算机上的位置。
我如何避免它
我正在使用python 3.7尝试运行:
print(r"C:\Users>") # this will make it a raw string, so it will not care about any backslashes (or you can just make it 2 backslashes so it will print one backslash like this: print('C:\Users>')
打印(“C:\\Users>”)
它可以工作!谢谢你,伙计!