![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
源码
文章平均质量分 75
panaman
这个作者很懒,什么都没留下…
展开
-
python 核心编程第九章练习题
9–1. 文件过滤. 显示一个文件的所有行, 忽略以井号( # )开头的行. 这个字符被用做Python , Perl, Tcl, 等大多脚本文件的注释符号. 附加题: 处理不是第一个字符开头的注释.def readFile(): fi = open('D:/test.txt', 'r') listFile = [] for eachLine in fi:原创 2016-11-07 14:23:57 · 665 阅读 · 0 评论 -
Python 核心编程第七章练习题
7-1. update def updateDict(): dict1 = {'name': 'John', 'Age': 20} dict2 = {'address': 'Beijing road'} dict1.update(dict2) print(dict1)原创 2016-10-27 14:25:29 · 1456 阅读 · 0 评论 -
Python 笔试题
1. 写一个函数,实现输入a,b两个参数,输出a的b次方,不能用库函数。 def power(a, b): if b == 0: print(1) elif b > 0: re = a*a for i in range(1,b-1): re = re * a print(re) els原创 2016-12-10 11:48:08 · 377 阅读 · 0 评论