数据类型转换总结
摘要:
1.字典 dic = {"k1":"v1","k2":"v2","k3":[11,22,33]} print(str(dic)) #转字符串 感觉无区别 返回: {'k1': 'v1', 'k2': 'v2', 'k3': [11, 22, 33]}. print(tuple(dic)) #转元祖. 阅读全文
posted @ 2018-03-21 03:11 sunny7 阅读(177) 评论(0) 推荐(0) 编辑