How do you pass parameters to a class in Python?

Passing object as parameter In class Person, MyClass is also used so that is imported. In method display() object of MyClass is created. Then the my_method() method of class MyClass is called and object of Person class is passed as parameter. On executing this Python program you get output as following.

Sizin İçin Seçtik  What is a class in Python?

Leave a Reply

Your email address will not be published. Required fields are marked *