列表的应用
import turtle turtle.speed(10) colors = ['red','purple','blue','green','yellow','orange','pink'] for i in range(200): turtle.pencolor(colors[i%7]) turtle.forward(i) turtle.left(59) turtle.done()
name = ['Lucas','Ava','Tracy'] #list print(name[1]) scores = [95,75,85] #list d = {'Lucas':95,'Ava':75,'Tracy':85} #dict d['Ava']=88 d['Lisa']=78 d.pop('Lucas') print(d) att = {'name': '201709080070许佳婷','LateTime':0,'onTime':6,'workTime':7} print(att['workTime'])