Cleaning

Report a typo

Tom is learning dictionaries in Python. Here are the dictionaries he has created:

first_dict = {'key1': 'value1', 'key2': 'value2'}
second_dict = first_dict
third_dict = second_dict

Below there's a table with several lines of code on the left. Match them to their output.

Choose one option for each row
{}{'key1': 'value1', 'key2': 'value2'}

first_dict.clear()
print(third_dict)


second_dict = {}
print(third_dict)

___

Create a free account to access the full topic