Advertisement
Sabev

Append Lists

Jan 14th, 2019
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. list_strings = list(input().split('|'))
  2. list_strings.reverse()
  3.  
  4. new_list = []
  5.  
  6. list_of_int = []
  7. for str in list_strings:
  8.     str_split = str.split(" ")
  9.     for el in str_split:
  10.         list_of_int += [el]
  11.         if el != '':
  12.             new_list.append(el)
  13.  
  14.  
  15. print(*new_list)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement