Answer the question
In order to leave comments, you need to log in
How to access this dictionary?
There is a mrs dictionary, its content is as follows:
{'Пирожок манго-маракуйя': '58 ₽'}
{'Пирожок Вишневый': '50 ₽'}
{'Салфетка влажная': '2 ₽'}
{'Соус Терияки': '29 ₽'}
{'Соус Чесночный': '29 ₽'}
{'Соус Сырный': '29 ₽'}
{'Соус Кисло-Сладкий': '29 ₽'}
{'Соус Барбекю': '29 ₽'}
{'Соус Горчичный': '29 ₽'}
{'Соус Тысяча Островов': '29 ₽'}
{'Соус Сладкий Чили': '29 ₽'}
{'Кетчуп': '29 ₽'}
{'Молочный Коктейль Клубничный': '104 ₽'}
Answer the question
In order to leave comments, you need to log in
This is not a dictionary, but a list of dictionaries.
def get_price(name):
for el in mrs:
if list(el.keys())[0] == name:
return list(el.values())[0]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question