摘要:
直接看reference Reference Python Enchancement Proposals(peps) 菜鸟教程-Python 函数装饰器 python101-chapter25 Decorators 廖雪峰-装饰器 Intermedium python python进阶 python 阅读全文
posted @ 2024-03-09 10:23
光辉233
阅读(12)
评论(0)
推荐(0)
摘要:
字典的迭代 d = {'a': 1, 'b': 2, 'c': 3} for key in d: print(key) for value in d.values(): print(value) for k,v in d.items(): print 索引,元素对 for i, value in e 阅读全文
posted @ 2024-03-09 09:52
光辉233
阅读(17)
评论(0)
推荐(0)
摘要:
1. 迭代(Iteration)与可迭代对象 如果给定一个list或tuple,我们可以通过for循环来遍历这个list或tuple,这种遍历我们称为迭代(Iteration), 这些可以直接作用于for循环的对象统称为可迭代对象:Iterable 2. 一种节省内存的可迭代对象generator- 阅读全文
posted @ 2024-03-09 09:52
光辉233
阅读(308)
评论(0)
推荐(0)
浙公网安备 33010602011771号