0 votes
in Python by (30.5k points)
What Is Class In Python?

1 Answer

0 votes
by (23.1k points)
Python supports object-oriented programming and provides almost all OOP features to use in programs.

A Python class is a blueprint for creating the objects. It defines member variables and gets their behavior associated with them.

We can make it by using the keyword “class.” An object gets created from the constructor. This object represents the instance of the class.

In Python, we generate classes and instances in the following way.

>>>class Human:  # Create the class

...     pass

>>>man = Human()  # Create the instance


<__main__.Human object at 0x0000000003559E10>

Related questions