寫在前面:好久沒寫python了難免有些生疏,尷尬的搓手手,學以致用,還需勤練。變量名都會命錯也是絕了
def savetxt(file_name, contents):with open(file_name,'w') as f:f.write(contents) import base64
with open('1.png','rb') as f:ls_f = base64.b64encode(f.read())s = ls_f.decode()#print('%s'%s)
savetxt('try.txt', s)
版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。
工作时间:8:00-18:00
客服电话
电子邮件
admin@qq.com
扫码二维码
获取最新动态