Advertisement
SansPapyrus683

Loops

May 22nd, 2022
927
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. hugehairypants = ['huge', 'hairy', 'pants']
  2. for i in hugehairypants:
  3.     print(i)
  4.  
  5. for i in hugehairypants:
  6.     print(i)
  7.     print(i)
  8.  
  9. for i in hugehairypants:
  10.     print(i)
  11.     for j in hugehairypants:
  12.         print(j)
  13.     print('this one is done')
  14.  
  15. for step in range(0, 5 + 1):
  16.     print(step)
  17.  
  18. x = 45
  19. y = 80
  20. while x < 50 and y < 100:
  21.     x = x + 1
  22.     y = y + 1
  23.     print(x, y)
  24.  
Advertisement
RAW Paste Data Copied
Advertisement