天天看點

python while語句

while 判斷條件:       #在給定的判斷條件為 true 時執行循環體,否則退出循環體

    執行語句

count = 0

while (count < 3):

   print ('The count is:', count)

   count = count + 1

print ("Good bye!")

The count is: 0

The count is: 1

The count is: 2

Good bye!

本文轉自 jin626889 51CTO部落格,原文連結:http://blog.51cto.com/zuoshou/1981751,如需轉載請自行聯系原作者

上一篇: python EasyGui
下一篇: 枚舉屬性