diff --git a/app/main.py b/app/main.py index f07695b9b..4285b578b 100644 --- a/app/main.py +++ b/app/main.py @@ -16,4 +16,28 @@ } collection_of_coins = {1, 2, 25} -# write your code here +mutable = [] +immutable = [] + +def sort_variables(): + for name, value in globals().items(): + if name.startswith("__") or name in ( + "mutable", + "immutable", + "sorted_variables", + "sort_variables", + ): + continue + + if isinstance(value, (list, dict, set, tuple)): + mutable.append(value) + else: + immutable.append(value) + + +sort_variables() + +sorted_variables = { + "mutable": mutable, + "immutable": immutable, +}