python program to print numbers from 1 to 10 code example Example: how to print numbers from 1 to 20 in python for i in range(1, 21): print(i)