发布时间:2019-09-22 07:39:35编辑:auto阅读(2278)
因为python的read和write方法的操作对象都是string。而操作二进制的时候会把string转换成list进行解析,解析后重新写入文件的时候,还得转换成string。
>>> import string
>>> str = 'abcde'
>>> list = list(str)
>>> list
['a', 'b', 'c', 'd', 'e']
>>> str
'abcde'
>>> str_convert = ''.join(list)
>>> str_convert
'abcde'
>>>
上一篇: 用python写exploit
下一篇: 关于python类的组合
50972
50354
40970
37838
32302
29193
28079
22909
22871
21203
1072°
1746°
1431°
1364°
1634°
1451°
2110°
3657°
3584°
2528°