Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- list_strings = list(input().split('|'))
- list_strings.reverse()
- new_list = []
- list_of_int = []
- for str in list_strings:
- str_split = str.split(" ")
- for el in str_split:
- list_of_int += [el]
- if el != '':
- new_list.append(el)
- print(*new_list)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement