Pyhton学习——Day28
摘要:
#上下文协议:文件操作时使用with执行# with open('a.txt','w',encoding='utf-8') as f1:# with语句,为了让一个对象兼容with语句,必须在这个对象的类中声明__enter__和__exit__方法# class Open:# def __init 阅读全文
posted @ 2018-03-05 17:53 pandaboy1123 阅读(131) 评论(0) 推荐(0)
浙公网安备 33010602011771号