I have a list of strings and those strings are lists. Like this: [\'[1,2,3]\',\'[10,12,5]\'], for example. I want to get a list of lists or even every list there: <
[\'[1,2,3]\',\'[10,12,5]\']
You use ast.literal_eval
import ast l = ['[1,2,3]','[10,12,5]'] l = [ast.literal_eval(i) for i in l]