viligen

group_of_10s

Oct 22nd, 2021
964
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data