Python 常用模块详解

#!/usr/bin/env python # -*- coding:utf-8 -*- import json def sayhi(name): print("hello",name) info = { 'name':'alex', 'age':22, } f = open("text.text","w") f.write(json.dumps(info)) info['age'] = 21 f.write(json.dumps(info)) f.close()

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/4efcd09ffb5c77f20e7a24d755b54e99.html