摘要:        
封装示例:游戏开发 ## 初级!!! class Police: def __init__(self,name): self.nam = name #从左至右赋值 self.hp = 10000#警察初始生命值 def tax(self): msg = "%s收了个税"%(self.nam) pri    阅读全文
posted @ 2020-09-23 22:08
小杨的冥想课
阅读(104)
评论(0)
推荐(0)
        
            
        
        
摘要:        
面向对象基础2 实例化对象 案例及思考 class File: def read(self): with open(self.xxxx,'r',encoding="utf-8") as f: data = f.read() def write(self,): with open(self.xxxx,    阅读全文
posted @ 2020-09-23 17:33
小杨的冥想课
阅读(99)
评论(0)
推荐(0)
        
                    
                
浙公网安备 33010602011771号