python
qq_36829583
这个作者很懒,什么都没留下…
展开
-
python搜集参数
收集参数在这里插入代码片def stu(*arge): for(i in arge): print(i)stu('a','b','v')结果原创 2018-12-12 16:19:47 · 127 阅读 · 0 评论 -
python 集合操作
python 集合操作在这里插入代码片#集合#intersection 交集#difference 差集#union 并集#issubset 检查一个集合是否为拧一个子集#issuperset 检查一个集合是否为d另一个的超集a = {1,2,1,3,4,5}b = {4,5,6,7,8}e = a.intersection(b)print('交集:{}'.format(e)...原创 2018-12-18 11:10:54 · 121 阅读 · 0 评论 -
python类的创建
python类的创建在这里插入代码片"""定义学生类"""class Student(): name = None age = 18 coures = 'python' #定义方法 def doHomeWork(self): print('I 在做作业') return None#实例化一个学生yueyue...原创 2018-12-18 14:13:36 · 366 阅读 · 0 评论