<分区>
我有这样一个字符串:
l1="[{'t_steps': '', 't_expected': '', 't_type': 'Functional', 't_precond': 'xxx', 't_notes': 'test note', 't_name': 'First test'}]"
我需要将它转换成一个真正的列表对象,例如:
l1=[{'t_steps': '', 't_expected': '', 't_type': 'Functional', 't_precond': 'xxx', 't_notes': 'test note', 't_name': 'First test'}]
我试过:
l1=list(l1)
或
l1=l1.split(',')
但是结果并不好。 请有人帮我把我的字符串转换成 python 可以读取的形式吗?
非常感谢