Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = list(range(1, 1024 + 1))
- nop = 0
- while len(a) > 1:
- nop += 1
- if nop % 2 == 1:
- for i in range(len(a) // 2): a.pop(i)
- else:
- for i in range(1, len(a) // 2 + 1): a.pop(i)
- print(len(a), a)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement