Technology Learning

导航

2013年8月2日

python 核心编程课后练习(chapter 3)

摘要: 3-8 1 #3-8 2 "makeTextFile.py -- create text file" 3 4 import os 5 ls = os.linesep 6 7 #get filename 8 fname = raw_input() 9 while True:10 11 if os.path.exists(fname):12 print "ERROR: '%s' already exists" % fname13 else:14 break15 all = []16 print "\nEnter lines ( 阅读全文

posted @ 2013-08-02 09:58 浔阳渔夫 阅读(283) 评论(0) 推荐(0) 编辑