![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
kerouacs
这个作者很懒,什么都没留下…
展开
-
【python】
fg=Falsewhile fg==False: bas=raw_input("请输入您的菜单选项:") if bas=="A": print"取五个数的和" elif bas=="B": print"去五个数的均值" elif bas=="x": print "退出" else:原创 2018-02-01 15:18:02 · 147 阅读 · 0 评论 -
[PYTHON】打开文件代码
filename = raw_input('Enter file name: ')fobj = open(filename, 'r')for eachLine in fobj:print eachLine,fobj.close()程序执行后输入文件名原创 2018-02-01 16:11:21 · 2372 阅读 · 0 评论 -
[python]makeTextFile.py 和 readTextFile.py 脚本
makeTextFile.py(Python3.0版本下的编写)# coding=utf-8"makeTextfile.py -- create text file"import osls = os.linesepwhile True: fname = input("please input your file name: ") if os.path.exists转载 2018-02-01 22:27:24 · 366 阅读 · 0 评论