There are several methods to perform this task but I personally recommend you to use ast.literal_eval It's the safe eval method to perform, check following code to your problem:
>>> import ast
Mention your doubts in comments. Cheers....!!
To know more about this you can have a look at the following video tutorial:-
Learn more about Python from an expert. Enroll in our Python Course