Advertisement
biswasrohit20

ver2

Apr 11th, 2021
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. numbers = input("Please enter the numbers separated by a space: ")
  2. numbers = numbers.split(" ")
  3. num_list = []
  4. for n in numbers:
  5. if n.isdigit():
  6. num_list.append(int(n))
  7.  
  8. num_list.sort()
  9. for i in num_list:
  10. if i >= 0:
  11. print(i, end=" ")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement