常用数据类型间转换
str--->list split(‘‘)
list-->str str1 = ‘x‘.join(l1)
str-->tuple t1 = tuple(str1)
list-->tuple t1 = tuple(l1)
字符串---->字典
a=‘{"name":"yct","age":10}‘
print(a) # {"name":"yct","age":10} <class ‘str‘>
原文:https://www.cnblogs.com/shangerzhong/p/9006342.html