How to convert string into dictionary in python

preview_player
Показать описание
In this video i explained, how to convert string to dictionary. To solve this problem i used list comprehensive and dictionary comprehensive.
Рекомендации по теме
Комментарии
Автор

what if you don't know values, have make dict only from keys from a list/string, and add value to it, with variable, like variable 'age', also can have multiple values assign to diff variable. Any idea? how to do it?

zakjay
Автор

very helpful - Can you please help me in understanding why we used k for k in while creating the list?

whalemurugun
Автор

I have text file which have a dictionary like s={something}
I need to open this update the dictionary and save it as new file

eramitjangra
Автор

readData = for a in readData}
IndexError: list index out of range

lovietech
Автор

Bro, i have one data dictionary but first and last have character {", example : Dict = {"{'data' : '200'}"}

How to delete two character in first and last data? I want delete char {" and "}

salmanxfxa