标签:list str1 转换 nbsp dict print -- split 类型
常用数据类型间转换
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‘>
标签:list str1 转换 nbsp dict print -- split 类型
原文地址:https://www.cnblogs.com/shangerzhong/p/9006342.html