高大上的迭代器

mac2022-06-30  105

ls = list(i for i in range(10))        ####快速创建了一个里面都是整数的list

ln = list(str(i) for i in range(10))  ####快速创建了一个里面都是字符串的list

转载于:https://www.cnblogs.com/yehui/p/9047059.html

最新回复(0)