Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- data = input().split('|')
- data = [*data]
- new_list = []
- for el in data[::-1]:
- el = el.split(' ')
- nums = [int(x) for x in el if x != '']
- if not len(nums) == 0:
- new_list += nums
- print(*new_list, sep=" ")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement