What would be the output of following Python code snippet:
maintenance ={"car" : 2000, "furniture" : 1000, "Filter" : 1500}
print(maintenance["car"])
print(maintenance["Filter"])Show SolutionHide Solution↓
2000
1500
- The dictionary
maintenancestores key–value pairs. maintenance["car"]accesses the value associated with the key"car", which is2000.maintenance["Filter"]accesses the value associated with the key"Filter", which is1500.- Hence, the output is:
2000
1500