python when loop code example Example 1: pytho loops for x in loop: print(x) Example 2: python for loop for x in (list): print(x)