參考資訊: 網站: https://automatetheboringstuff.com/chapter2/ 影片: https://www.youtube.com/watch?v=HFQGxh1jY3g


說明:

for i in range(起始值, 結束值, 間隔): 能生產出規律的數列

  • range如果沒定義起始值,會從0開始
  • 壘加到最後的值,值 = (結束值-1)
  • 能設定起始值 結束值 間隔


0 to 5:



while effect:



0 to 100 plus:



start to stop:



start to stop interval: