# 範例6-1-2 import turtle as t t.bgcolor("black") color = ["red","yellow","blue","white","green","purple"] t.speed(0) for i in range(0,200,3): t.pencolor(color[i%6]) t.fd(i) t.lt(35) t.done()
6-1-2 更多list指令
# 範例6-1-3 空集合[] Arr = [] for i in range(3,25,3): Arr.append(i) print(Arr)