simeonshopov

Flatten Lists

May 26th, 2020
366
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.14 KB | None | 0 0
  1. lists = input().split('|')[::-1]
  2. [x.strip() for x in lists]
  3. lists = [x.split() for x in lists if x]
  4. print(*[x for y in lists for x in y])
Advertisement
Add Comment
Please, Sign In to add comment