2021
07-01
07-01
聊一聊python常用的编程模块
文件流的读写读取保存数据为数组的txt文件使用try进行异常发现,使用while检测文件末尾进行读取file_to_read=raw_input("Enterfilenameoftests(emptystringtoendprogram):")try:infile=open(file_to_read,'r')whilefile_to_read!="":file_to_write=raw_input("Enteroutputfilename(.csvwillbeappendedtoit):")file_to_write=file_to_write+".csv"outfile=open...
继续阅读 >