day 3 list列表生成式

1.定義一個list列表,裏面元素是0-33 a = [] i = 0 while i<33: a.append(i) i+=1 print(a) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 3
相關文章
相關標籤/搜索