上一页 1 ··· 8 9 10 11 12 13 14 15 下一页
摘要: TrueFalse<class 'str'> ["[1, 2, '\\u5f00\\u5916\\u6302\\u5f00\\u5916\\u6302']"]0b100111111011Falseb'Abcde' b'abcde'97bytearray(b'adcde')FalseW11901234 阅读全文
posted @ 2018-11-09 11:14 rongye 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 内置参数详解 https://docs.python.org/3/library/functions.html?highlight=built#ascii 阅读全文
posted @ 2018-11-09 09:23 rongye 阅读(156) 评论(0) 推荐(0) 编辑
摘要: A 准备吃包子啦!B 准备吃包子啦!老子开始准备做包子啦!做了1个包子,分两半!包子[0]来了,被[A]吃了!包子[0]来了,被[B]吃了!做了1个包子,分两半!包子[1]来了,被[A]吃了!包子[1]来了,被[B]吃了!做了1个包子,分两半!包子[2]来了,被[A]吃了!包子[2]来了,被[B]吃 阅读全文
posted @ 2018-11-09 09:05 rongye 阅读(129) 评论(0) 推荐(0) 编辑
摘要: g: 1g: 1g: 2g: 3g: 5g: 8Generator return value: done start loop 阅读全文
posted @ 2018-11-09 09:03 rongye 阅读(138) 评论(0) 推荐(0) 编辑
摘要: welcome to index pageUsername:lianPassword:abc123User has passed authenticationwelcome to home page welcomeldap++++++ 阅读全文
posted @ 2018-11-07 17:04 rongye 阅读(128) 评论(0) 推荐(0) 编辑
摘要: import timeuser,passwd = 'lian','abc123'def auth(func): def wrapper(*args,**kwargs): username = input("Username:").strip() password = input("Password: 阅读全文
posted @ 2018-11-07 11:58 rongye 阅读(107) 评论(0) 推荐(0) 编辑
摘要: import timedef timer(func): def deco(*args,**kwargs): start_time=time.time() func(*args,**kwargs) stop_time=time.time() print('the func run time is %s 阅读全文
posted @ 2018-11-07 11:40 rongye 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 变量可以指向函数,函数的参数能接收变量,那么一个函数就可以接收另一个函数作为参数,这种函数就称之为高阶函数。 1 2 3 4 5 6 def add(x,y,f): return f(x) + f(y) res = add(3,-6,abs) print(res) 1 2 3 4 5 6 def a 阅读全文
posted @ 2018-11-06 16:04 rongye 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 在函数内部,可以调用其他函数。如果一个函数在内部调用自身本身,这个函数就是递归函数。 1 2 3 4 5 6 7 8 9 10 11 12 13 def calc(n): print(n) if int(n/2) ==0: return n return calc(int(n/2)) calc(10 阅读全文
posted @ 2018-11-06 15:43 rongye 阅读(303) 评论(0) 推荐(0) 编辑
摘要: before change lian Oldboy edu.after change Lian YunNan Universitylian YunNan University 阅读全文
posted @ 2018-11-06 15:21 rongye 阅读(674) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 下一页