fruits = ['banana', 'apple', 'mango'] for index in range(len(fruits)):#len能取出元組中的字符串 print '當前水果 :', fruits[index] print "Good bye!" #當前水果 : banana 當前水果 : apple 當前水果 : mango Good bye!
fruits = ['banana', 'apple', 'mango'] for index in range(len(fruits)):#len能取出元組中的字符串 print '當前水果 :', fruits[index] print "Good bye!" #當前水果 : banana 當前水果 : apple 當前水果 : mango Good bye!
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。