摘要: from collections import namedtuple City=namedtuple('City','name country population coordinates') '''创建一个具名元组需要两个参数,一个是类名,另一个是类的各个字段的名字。 后者可以是由数个字符串组成的 阅读全文
posted @ 2021-09-15 10:26 里列昂遗失的记事本 阅读(30) 评论(0) 推荐(0) 编辑