一月5日

for索引
 
fruits = ['banana', 'apple', 'mango']
for index in range(len(fruits)):
print '当前水果 :', fruits[index]
print "Good bye!"

以上实例输出结果:

当前水果 : banana
当前水果 : apple
当前水果 : mango
Good bye!
posted @ 2021-01-05 10:27  hellowould  阅读(38)  评论(0编辑  收藏  举报