美文网首页
Python 33 Programming Tutorial

Python 33 Programming Tutorial

作者: 豆表示低调 | 来源:发表于2016-08-31 11:41 被阅读0次
class Mario():
    def move(self):
        print('I am Mario!')


class Shroom():
    def eat_shroom(self):
        print('Now I am big!')


class BigMario(Mario, Shroom):
    pass


bm = BigMario()
bm.move()
bm.eat_shroom()

相关文章

网友评论

      本文标题:Python 33 Programming Tutorial

      本文链接:https://www.haomeiwen.com/subject/oiaxettx.html