摘要:
f = open(r"E:\workspace\test\test2\tttttt.txt","w+")print(f.tell()) #告诉我们当前位置f.write("test line 1\n") #13个字节 \n算2个f.flush() #刷新文件内部缓冲区,让文件直接写入print(f. 阅读全文
摘要:
path = r"E:\workspace\test\test2\tttttt.txt"path1 = "d:" 1.os.getcwd print(os.getcwd())#当前路径 2.os.listdirprint(os.listdir()) #列出路径下的文件,默认是当前路径print(os 阅读全文