请问为什么我放在同一个文件夹下,用相对路径会显示No such file or directory: './test.txt'呀
f = open("./test.txt",'r')
content = f.readlines()
f1=open("./test1.txt","w")
for line in content:
line=content[::-1]
f1.write(line)
f1.close()
f.close()
f = open("./test.txt",'r')
content = f.readlines()
f1=open("./test1.txt","w")
for line in content:
line=content[::-1]
f1.write(line)
f1.close()
f.close()
2022-03-03
举报