GeorgiLukanov87

Group of 10

Jun 18th, 2022 (edited)
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1. numbers = list(map(int, input().split(", ")))
  2. current_list = []
  3. boundary = 0
  4. while len(numbers) > 0:
  5.     boundary += 1
  6.     for el in numbers:
  7.         if int(el) <= boundary * 10:
  8.             current_list.append(el)
  9.     print(f"Group of {boundary}0's: {current_list}")
  10.     for copy in current_list:
  11.         if copy in numbers:
  12.             numbers.remove(copy)
  13.     current_list.clear()
Add Comment
Please, Sign In to add comment