I have a string: x = '[{'id': 35, 'name': 'Comedy'}, {'id': 53, 'name': 'Thriller'}]'
I want to convert this string into a list:x = [{'id': 35, 'name': 'Comedy'}, {'id': 53, 'name': 'Thriller'}]
I tried doing this: x = list(x)
but this returns all the characters separated by a comma. ['[', '{', "'", 'i', 'd', "'", ':', ' ', '3', '5', ',', ' ', "'", 'n', 'a', 'm', 'e', "'", ':', ' ', "'", 'C', 'o', 'm', 'e', 'd', 'y', "'", '}', ']']
x = list(x)