摘要: 编程的三种方法论: 1面向过程 2函数式 3面向对象 阅读全文
posted @ 2018-03-29 20:55 阜阳小全 阅读(102) 评论(0) 推荐(0) 编辑
摘要: #正常函数形式 def calc(x): return x + 1 res = calc(10) print(res)#输出结果为11#匿名函数func = lambda x : x + 1res = func(10)print(res)#输出结果为11 阅读全文
posted @ 2018-03-29 17:33 阜阳小全 阅读(75) 评论(0) 推荐(0) 编辑
摘要: def foo(): name = 'lhf' def bar(): name = 'wupeiqi' def tt(): print(name) return tt return barfunc = foo()func()() 阅读全文
posted @ 2018-03-29 15:33 阜阳小全 阅读(102) 评论(0) 推荐(0) 编辑
摘要: import timeperson_li = ['alex','wpq','yd','lhf']def ask_way(person_li): print('*'* 80) if len(person_li) == 0: return '没人知道' person = person_li.pop(0) 阅读全文
posted @ 2018-03-29 13:59 阜阳小全 阅读(110) 评论(0) 推荐(0) 编辑