Informatics Practices
Find errors and rewrite the same after correcting the following code:
d1.value()
Python Dictionaries
1 Like
Answer
The correct method to retrieve all values from a dictionary is values(), not value().
The corrected code is:
d1.values()
Answered By
3 Likes
Related Questions
Find errors and rewrite the same after correcting the following code:
d1.item()Find errors and rewrite the same after correcting the following code:
d1.key()Find errors and rewrite the same after correcting the following code:
d1.gets(4, 80)Find errors and rewrite the same after correcting the following code:
d1.len()