📜  python 从字符串中提取列表 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:07.502000             🧑  作者: Mango

代码示例1
import ast
input = "[[1,2,3],['c',4,'r']]"
output = ast.literal_eval(input)
output
=> [[1, 2, 3], ['c', 4, 'r']]