码迷,mamicode.com
首页 > 编程语言 > 详细

python读写文件

时间:2015-12-13 12:33:03      阅读:144      评论:0      收藏:0      [点我收藏+]

标签:

import binascii
LIST= ["3130342e3233372e3134372e3139312038333636206166626434633133","3139322e3234312e3135332e33382038393337203631623461646533"]
def sayHello ():
    f = open(r"d:\12.txt","w+")
    count = 0
    for x in LIST:
        print binascii.unhexlify(x),
        count = count+1
        f.write(binascii.unhexlify(x))
    print count
    f.close()
#function
sayHello()  # call the function

 

python读写文件

标签:

原文地址:http://www.cnblogs.com/xunbu7/p/5042473.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!