From 8adbb3dc39eb5a4161441eb1356019e1e97e7a2a Mon Sep 17 00:00:00 2001 From: Mykola Date: Sun, 10 May 2026 01:46:39 +0300 Subject: [PATCH 1/3] Solution --- app/main.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index f07695b9b..ecfa2a4d7 100644 --- a/app/main.py +++ b/app/main.py @@ -16,4 +16,14 @@ } collection_of_coins = {1, 2, 25} -# write your code here +names = [item for item in dir() if not item.startswith('_')] +mutable_types = [list, dict, set] +sorted_variables = {"mutable": [], "immutable": []} +for item in names: + value = globals()[item] + if type(value) in mutable_types: + sorted_variables["mutable"].append(value) + else: + sorted_variables["immutable"].append(value) + + From e8a164ff27a2879badbb45d0a11713dc1faadae5 Mon Sep 17 00:00:00 2001 From: Mykola Date: Sun, 10 May 2026 01:48:28 +0300 Subject: [PATCH 2/3] Solution --- app/main.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/main.py b/app/main.py index ecfa2a4d7..1002a5ff9 100644 --- a/app/main.py +++ b/app/main.py @@ -16,7 +16,7 @@ } collection_of_coins = {1, 2, 25} -names = [item for item in dir() if not item.startswith('_')] +names = [item for item in dir() if not item.startswith("_")] mutable_types = [list, dict, set] sorted_variables = {"mutable": [], "immutable": []} for item in names: @@ -25,5 +25,3 @@ sorted_variables["mutable"].append(value) else: sorted_variables["immutable"].append(value) - - From 2831d02b3890d8cbe14a2520732be5a29a989169 Mon Sep 17 00:00:00 2001 From: Mykola Date: Sun, 10 May 2026 02:02:57 +0300 Subject: [PATCH 3/3] Solution --- app/main.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/app/main.py b/app/main.py index 1002a5ff9..5789d4378 100644 --- a/app/main.py +++ b/app/main.py @@ -16,12 +16,7 @@ } collection_of_coins = {1, 2, 25} -names = [item for item in dir() if not item.startswith("_")] -mutable_types = [list, dict, set] -sorted_variables = {"mutable": [], "immutable": []} -for item in names: - value = globals()[item] - if type(value) in mutable_types: - sorted_variables["mutable"].append(value) - else: - sorted_variables["immutable"].append(value) +sorted_variables = { + "mutable": [my_favourite_films, marks, collection_of_coins], + "immutable": [lucky_number, pi, one_is_a_prime_number, name, profile_info] +}