????? ??? ?? ??? ?? ??? ???? ??? ?? ??? ?????. ?? ?? ???? ??? ? ??? ?? ? ??? ? ????

Python ?? ? ???

Python? for ??? while ??? ?????(Python?? do..while ??? ????)

Python ?? ? ?

while循環(huán)語句
#!/usr/bin/python
 count = 0while (count < 9):   print 'The count is:', count
   count = count + 1
 print "Good bye!"
for 循環(huán)語句
#!/usr/bin/python# -*- coding: UTF-8 -*-
 for letter in 'Python':     # 第一個實例
   print '當(dāng)前字母 :', letter
 fruits = ['banana', 'apple',  'mango']for fruit in fruits:        # 第二個實例
   print '當(dāng)前水果 :', fruit
 print "Good bye!"