How does the self parameter work in the class?

Asked

Viewed 19 times

0

How self works in class?

class Cachorro:

    def comer(self):
        print('Cachorro está comendo.')


dog = Cachorro()

dog.comer()
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.