how to extract list or dictionary from String ? Convert String to List and Dictionary
I want to iterat through the list to print the dictionary value but i am not able to convert that string into list with proper format.
pro = '[{"name": "Ingenious Film Partners", "id": 289}, {"name": "Twentieth Century Fox Film Corporation", "id": 306}]'
print(type(pro))
<class 'str'>
i want list from the string but when i try to convert string into list it will return each character as list element.
pro = list(pro)
print(pro)
['[', '{', '"', 'n', 'a',........'6', '}', ']']
but i want to list with dictionary elements.