Question · Python course · Module 2: Data Structures
Accessing a Value
How do you get the value of the key 'name' from the dictionary 'animal'?
Answer options
- animal.name
- animal['name']
- animal[0]
- animal->name
Show the answer
Correct answer:
- animal['name']