Python Query - Quiz 5 Question

Can u please explain

1 Like

@mick4mayank

Option 3 is correct.
Because you marked option 2 and that option will be considered as list and not as a valid dictionary key.

1 Like

Why third one is right?

1 Like

@mick4mayank

A dictionary key must be of a type that is immutable.
However, neither a list nor another dictionary can serve as a dictionary key, because lists and dictionaries are mutable.