Skip to content

Commit

Permalink
Creating a dictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
Gudei committed Nov 13, 2023
1 parent e67b5ea commit 247e962
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,24 @@
"Sergio": 3,
}
collection_of_coins = {1, 2, 25}

# write your code here
# write code below this line
list_of_all_variable = [
lucky_number,
pi,
one_is_a_prime_number,
name,
my_favourite_films,
profile_info,
marks,
collection_of_coins
]
sorted_variables = {}
mutable_variable_list = []
immutable_variable_list = []
for element in list_of_all_variable:
if isinstance(element, (int, str, bool, float, tuple)):
immutable_variable_list.append(element)
else:
mutable_variable_list.append(element)
sorted_variables["mutable"] = mutable_variable_list
sorted_variables["immutable"] = immutable_variable_list

0 comments on commit 247e962

Please sign in to comment.