python练习六十一:文件处理,读取文件内容 假设要读取text.txt文件中内容 写文件(如果有文件,那直接调用就行,我这里自己先创建的文件) list1 = ['python','jave','go','shell','perl'] with open('text.txt','w+') as f: for i in list1: f.write(i+'\n') 方法一:使用with open() with open('text.txt','r') as f: f_connect = f.r