karolinagergert

Untitled

Jul 25th, 2019
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1.  
  2. b=[]
  3. c=[]
  4. i=0
  5. a=list(map(int, input().split()))
  6. for i in range(len(a)):
  7. b.append(a[i])
  8. c.append(a[i+1])
  9. i+=2
  10. elif i == len(a):
  11. if a[i-1] == b[-1]:
  12. c.append(a[i])
  13. elif a[i-1] == c[-1]:
  14. b.append(a[i])
  15. print(' '.join(map(str,b+c)))
Advertisement
Add Comment
Please, Sign In to add comment