错误一:
读取文件时路径输入有误:
f=open("D:\Python\Python37-32\a.txt","rt")
#上述代码中“ \ ”符号在python中代表转义符,和某些字母连接时会产生错误
运行结果:
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module
错误一:
读取文件时路径输入有误:
f=open("D:\Python\Python37-32\a.txt","rt")
#上述代码中“ \ ”符号在python中代表转义符,和某些字母连接时会产生错误
运行结果:
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module