绝对路径和相对路径
写程序要加这个
f=open("D:/MyProject/Python学习/demo.txt","w+") ls=["A","B","C"] f.writelines(ls) f.seek(0)#将指针返回到开头 for line in f: print(line)
绝对路径和相对路径
写程序要加这个
f=open("D:/MyProject/Python学习/demo.txt","w+") ls=["A","B","C"] f.writelines(ls) f.seek(0)#将指针返回到开头 for line in f: print(line)