Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- list_ppl = input().split()
- step = int(input())
- output_list = []
- i = 0
- while len(list_ppl) != 0:
- i += step - 1
- i = i % len(list_ppl)
- output_list.append(list_ppl[i])
- list_ppl.pop(i)
- print(f"[{','.join(output_list)}]")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement