> masteringswe_
codingpython

Class - instantiate

Create an instance of the given class, passing in any valid values as arguments to the constructor. Then invoke the fly() method on the instance.

pythonclass Bird:
    def __init__(self, name, age):
        self.name = name
        self.age = age

    def fly(self):
        print("Fly")