viligen

group_of_10s

Oct 22nd, 2021
1,226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.22 KB | None | 0 0
  1. numbers = list(map(int, input().split(", ")))
  2.  
  3. group = 10
  4.  
  5. while group < max(numbers) + 10:
  6.     filtered = [num for num in numbers if group - 10 < num <= group]
  7.     print(f"Group of {group}'s: {filtered}")
  8.     group += 10
Advertisement
Add Comment
Please, Sign In to add comment