Python学习笔记03文件操作

2019-07-13  本文已影响0人  YX_Andrew

使用Python对文件进行打开,关闭,读取,写入等操作

目标:达到excel和R tidyverse的水平。

data = open("D:/Users/Desktop/Length.txt","r")
while True:
    line = data.readline()
    if len(line)==0:
        break
    print(line)
data.close()

多个Excel表格里内容合并到一个文件中

上一篇 下一篇

猜你喜欢

热点阅读