Advertisement
Spocoman

01. Zeros to Back

Jan 24th, 2022
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.13 KB | None | 0 0
  1. lst = list(map(int, input().split(', ')))
  2.  
  3. for i in range(lst.count(0)):
  4.     lst.append(lst.pop(lst.index(0)))
  5.  
  6. print(lst)
  7.  
  8.  
  9.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement