1,字符串转整型,前提条件是该字符串为纯数字. a = '1' a = int(a) 2,整型转字符串 a= 1 a = str(a) 3,整型转浮点型 a = 1 a = float(a) 4,浮点型转整型 a = 1.2 a = int(a) 5,字符串转列表 a = 'abc' a = list(a) 6,列表转字符串 list = ['a','b','c'] '.'.join(list1) 7,字符串转元祖 a= 'abc' a= tuple(a) 8,元祖转字符串 tuple1= ('…