# range 範圍
# python內建功能:清單產生器
# range 通常與 for loop 搭配

import random

range(3) # [0, 1, 2]
range(5)

range(2, 5) # [2, 3, 4]
range(8, 10) # [8, 9]
range(2, 10, 3) # [2, 5, 8]
range(3, 8, 2) # [3, 5, 7]
range(10, 3, -2) # [10, 8, 6, 4]

for i in range(5):
	r = random.randint(1, 1000)
	print('這是第', i + 1, '次產生的隨機數: ', r)



