class World():

    def __init__(self,a,b,c):       #初始化方法__init__

        self.chinese = a          #实例变量(实例属性)
        self.american = b        #实例变量(实例属性)
        self.japenese = c        #实例变量(实例属性)

    def hobby(self):        #普通方法

        print('This is bobby')
        print(self.chinese,'likes eat')
        print(self.american,'likes exersie')
        print(self.japenese,'likes pussy')

    def good_at(self,juice):        #普通方法

        print('This is good at')
        print(self.chinese,'good at build')
        print(self.american,'good at technology')
        print(self.japenese,'good at takes 3A movies,and eat the pussy',juice)

world = World('袁隆平','Rock Josen','苍老师')         #实例化对象

world.good_at('juice')

扫描二维码,在手机上阅读!
最后修改:2020 年 02 月 03 日 05 : 45 PM
如果觉得我的文章对你有用,请随意赞赏