Advertisement
here2share

# sequence_shuffle.py

Jan 13th, 2023
1,013
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. # sequence_shuffle.py
  2.  
  3. n = 10
  4. iii = 0
  5. integers = []
  6. for i in range(-n, n+1):
  7.     integers.append(i)
  8.  
  9. integers = integers * 25
  10. L = len(integers)
  11.  
  12. def shuffle():
  13.     element = integers.pop((iii * 3) % L)
  14.     integers.append(element)
  15.  
  16. for i in range(5000):
  17.     shuffle()
  18.     print(integers[-1])
  19.     iii += 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement