creating list from string python code example
Example 1: how to convert a string to a list python
#How to split a string into a list (Python)
#"separator" should be replaced with the string you want to split with
string.split("separator")
Example 2: 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']]