How does Python execute this for-loop step by step?
11:21 14 Nov 2025
for i in range(1, 20):
    print(i)

I want to understand:

  • What (1, 20) means
  • How Python updates value of i
  • Why the loop prints the number one by one
python loops for-loop