for loop from 1 to 4 in python code example Example 1: pytho loops for x in loop: print(x) Example 2: python for loop range for i in range(0, 3): print(i)