02 2018 档案

摘要:def f(max): n, a, b = 0, 0, 1 while n <= max: yield b a, b = b, a + b n += 1 yield 'done' for i in f(5): print(i) 阅读全文
posted @ 2018-02-27 10:52 xusuns 阅读(363) 评论(0) 推荐(0)
摘要:def bett(f): def inner(): print('123') f() print('hello') return inner @bett def f(): print('abc') f() 阅读全文
posted @ 2018-02-14 21:28 xusuns 阅读(76) 评论(0) 推荐(0)
摘要:def register(NAME, PWD, TEL): with open('userdate.txt', 'a', encoding='utf-8') as f: new = '&&'.join([NAME, PWD, TEL]) f.write('\n' + str(new)) return True def same(NAME): ... 阅读全文
posted @ 2018-02-06 14:35 xusuns 阅读(177) 评论(0) 推荐(0)
摘要:def register(name, pwd, tel): with open('userdate.txt', 'a', encoding='utf-8') as f: new = {} new[name] = [pwd,tel] f.write('\n' + str(new)) return True def same... 阅读全文
posted @ 2018-02-04 10:34 xusuns 阅读(248) 评论(0) 推荐(0)