Вот мой код with open('yvd.txt') as fd:
name='Trevor Jones'
input=[x.split('|') for x in fd.readlines()]
to_search={x[0]:x for x in input}
print('\n'.join(to_search[name]))
Я пыт
Вот код (он работает внутри класса): if profile['profile_picture']:
profile['profile_picture_raw_path'], # Line 26
profile['profile_picture_thumbnail'],
profile['profile_picture'] = sel
У меня есть глубокий вложенный dict (декодируется из json, из instagram api). Мой исходный код был так: caption = post['caption']['text']
Но что бы бросить NoneType или ошибка KeyError, если «подпис