DICTIONARY ASSIGNMENT
by Devrishi Mallick
1.
A dictionary is termed an unordered collection because its elements are not stored in a specific sequence like a list or a string
2.
the clear function removes all of the key value pairs but the del statement deletes the entire dictionary from the memory
3.
for the immutable type changes to the copy of the original doesnot affect the original because changes creates an entirely new dict
for the mutable type chamges caused to the copy is also seen in the original because both share the same memory location or id
4.
syntax error due v1
5.
6.
a. counts[word]
b.my_dict[[4, 2, 1]] = 10 lists are mutable
7.
a. 1
[Link] as two keys cant be accessed at the same time
8.
9.
10.
for the dict values can be of any type they can be muttable or immutable
for the dict keys they must be immutable like int float string and tuple