如何打印土耳其语?
open("save.txt", "w+").write("C:\Müzikler")
folder = open("save.txt", "r+").read()
os.listdir(folder)
输出:
FileNotFoundError: [WinError 3] The system cannot find the path specified:
C:\xfczikler'
答案 0 :(得分:0)
对于特殊字符(或您的重音符号),您需要使用utf-8进行编码。
执行以下操作:
open("save.txt", 'w+', encoding='utf-8').write("C:\Müzikler")