码迷,mamicode.com
首页 > 其他好文 > 详细

列表实例

时间:2018-05-30 22:45:00      阅读:185      评论:0      收藏:0      [点我收藏+]

标签:列表   import   code   class   imp   for   orange   ima   img   

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

for i in range(200):
    turtle.pencolor(colors[i% 6])
    turtle.forward(i)
    turtle.left(59)
turtle.done()

技术分享图片

列表实例

标签:列表   import   code   class   imp   for   orange   ima   img   

原文地址:https://www.cnblogs.com/guangzhoushangxueyuan121/p/9113658.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!