88

读写文件、文件方法、python2的乱码问题、python对passwd文件进行排序-方向对了,就不...

 6 years ago
source link: http://blog.51cto.com/jacksoner/2065898
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
读写文件if__name__=='__main__':filename=input('请输入保存的文件:')fdfile=open(filename,'w+')while1:text=input('请输入内容:')iftext=='EOF':breakelse:fdfile.write(text)fdfile.write('\n')fdfile.close()readfile=open(filen

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK