python code:
def main():
a='10001'
b='[1,2,3,4,[5,6,7,8,9]]'
c="{'a':123,'b':456,'c':789}"
d='([1,3,5],[5,6,7,8,9],[123,456,789])'
print('====eval 转换======')
print(type(a),type(eval(a)))
print(type(b),type(eval(b)))
print(type(c),type(eval(c)))
print(type(d),type(eval(d)))
if __name__ == "__main__":
main()
说明:
eval 将字符串转换为去除字符串后的类型