Python基礎學習(二) ------ while /for循環

一.while循環 while 語句同其餘編程語言中 while 的使用方式大同小異,主要結構以下express while condition: expressions 其中 condition 爲判斷條件,在 Python 中就是 True 和 False 其中的一個,若是爲 True, 那麼將執行 exexpressions 語句,不然將跳過該 while 語句塊接着往下執行。編程
相關文章
相關標籤/搜索