We probably learnt to use dict[key] to access a value in a dictionary at the start. But here’s a better way to do that.
The original dict[key] method
d = {'apple':4, 'orange':5, 'pear':6}
x = d['apple'] # 4
y = d['orange'] # 5
...