how to extract items as string from list of list code example
Example: python extract list from string
import ast
input = "[[1,2,3],['c',4,'r']]"
output = ast.literal_eval(input)
output
=> [[1, 2, 3], ['c', 4, 'r']]
import ast
input = "[[1,2,3],['c',4,'r']]"
output = ast.literal_eval(input)
output
=> [[1, 2, 3], ['c', 4, 'r']]