摘要: 2分查找 阅读全文
posted @ 2017-09-03 10:45 王盼0810 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 简单的装饰器: def login(func): def inner(arg): print('对%s进行审查...'%arg) func(arg) return inner@logindef tv(name): print('欢迎%s'%name)# tv = login(tv)tv('alex' 阅读全文
posted @ 2017-09-03 10:44 王盼0810 阅读(87) 评论(0) 推荐(0) 编辑
摘要: def main(d1,d2,stop): if d1==0: print(d1,d2) d3 = d1 +d2 print(d3) if d3<stop: main(d2,d3,stop)main(0,1,30) 阅读全文
posted @ 2017-09-03 10:12 王盼0810 阅读(192) 评论(0) 推荐(0) 编辑