Q. How do you access ‘value’ from {‘key’: ‘value’}?

A
dict.get('key')
B
dict['key']
C
Both A and B
D
dict.key
Solution:

Both dict.get(‘key’) and dict[‘key’] access ‘value’ from the dictionary.

Entri Contact Image

Get Expert Advice for Free: Register for Your Free Consultation Now!