Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions app/main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
lucky_number = 777
lucky_number: int = 777
pi = 3.14
one_is_a_prime_number = False
name = "Richard"
Expand All @@ -16,4 +16,27 @@
}
collection_of_coins = {1, 2, 25}

# write your code here
this_dict = {
"lucky_number": lucky_number,
"pi": pi,
"one_is_a_prime_number": one_is_a_prime_number,
"name": name,
"my_favourite_films": my_favourite_films,
"profile_info": profile_info,
"marks": marks,
"collection_of_coins": collection_of_coins,
}

list_mut = []
list_immut = []

for key, value in this_dict.items():
if type(value) in (list, dict, set):
list_mut.append(value)
else:
list_immut.append(value)

sorted_variables = {
"mutable": list_mut,
"immutable": list_immut,
}
Comment on lines +39 to +42
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The values in sorted_variables contain strings (dictionary keys) instead of actual variable references. According to the task, each value should be a list of the actual variables like my_favourite_films, marks, collection_of_coins, etc.

Loading