python for loop numbers 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)