Advertisement
Nenogzar

Untitled

Feb 12th, 2024
1,280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1. numbers = [int(n) for n in input().split(", ")]
  2. check_numbers = list()
  3.  
  4. for number in range(1, 10 + 1):
  5.     check_numbers.clear()
  6.     if len(numbers) != 0:
  7.         for num in numbers:
  8.             if int(num) <= number * 10:
  9.                 check_numbers.append(num)
  10.         for d in check_numbers:
  11.             numbers.remove(d)
  12.  
  13.         print(f"Group of {number * 10}'s: {check_numbers}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement