Spocoman

07. Group of 10's

Feb 12th, 2022 (edited)
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.22 KB | None | 0 0
  1. groups = list(map(int, input().split(', ')))
  2. max_num = max(groups)
  3.  
  4. for i in range(10, max_num + 10, 10):
  5.     if max_num + 9 < i:
  6.         break
  7.     print(f"Group of {i}'s: {[x for x in groups if i - 10 < x <= i]}")
  8.  
Add Comment
Please, Sign In to add comment