total = 0 # range(1, 5) is 1, 2, 3, 4 for i in range(1, 5): total += i print(total)
range gives a sequence of ints