Paris-

导航

列表的应用

import turtle
turtle.speed(10)
colors=['red','purple','blue','green','yellow','orange','black','gold','brown',]

for i in range(200):
    turtle.pencolor(colors[i%9])
    turtle.forward(i)
    turtle.left(60)


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': '201709090034许艺莹','LateTime':0,'onTime':6,'workTime':7}
print(att['workTime'])

 

posted on 2018-06-05 23:58  Paris-  阅读(114)  评论(0编辑  收藏  举报