摘要: 一、基本语法使用from collections import Iterable for x in '1,2,3,4': print(x) #迭代 list tuple 都可以迭代 print(isinstance('abc',Iterable)) #isinstance('***',Iterabl 阅读全文
posted @ 2019-09-27 11:12 Renqy 阅读(161) 评论(0) 推荐(0) 编辑
摘要: print('*'*50) list1 = list(range(1,6)) print(list1) del(list1) #range(1,20) 按顺序生成列表 list1 = [] for x in range(1,6): list1.append(x*x*x) print(list1) d 阅读全文
posted @ 2019-09-27 11:04 Renqy 阅读(298) 评论(0) 推荐(0) 编辑