Advertisement
GeorgiLukanov87

append_list100/100

Jun 24th, 2022
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.22 KB | None | 0 0
  1. data = input().split('|')
  2. data = [*data]
  3. new_list = []
  4. for el in data[::-1]:
  5.     el = el.split(' ')
  6.     nums = [int(x) for x in el if x != '']
  7.     if not len(nums) == 0:
  8.         new_list += nums
  9.  
  10. print(*new_list, sep=" ")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement