>>> s = [u‘127.0.0.1‘, 33428] >>> s [u‘127.0.0.1‘, 33428] >>> type(s) <type ‘list‘>
>>> tos = str(s) >>> tos "[u‘127.0.0.1‘, 33428]" >>> for i in tos: ... print i ... [ u ‘ 1 2 7 . 0 . 0 . 1 ‘ , 3 3 4 2 8 ] >>> l = list("[u‘127.0.0.1‘, 33428]") >>> l [‘[‘, ‘u‘, "‘", ‘1‘, ‘2‘, ‘7‘, ‘.‘, ‘0‘, ‘.‘, ‘0‘, ‘.‘, ‘1‘, "‘", ‘,‘, ‘ ‘, ‘3‘, ‘3‘, ‘4‘, ‘2‘, ‘8‘, ‘]‘]
无法转回来
时间: 2024-10-17 05:22:17