super class

mail@pastecode.io avatar
unknown
python
2 months ago
337 B
3
Indexable
Never
class Murid:
    def __init__(self):
        self.num_eyes = 2

    def kegiatan(self):
        print("rebahan")

class RakyatGaperi(Murid):
    def __init__(self):
        super().__init__()
    
    def kegiatan(self):
        super().kegiatan()
        print("coli ngengggggg")

fahri = RakyatGaperi()
fahri.kegiatan()
Leave a Comment