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