Home Tutorials Python OOP Concepts Object
Object

Object


2. Object

An object is an instance of a class. Objects use the data and behavior defined in the class.

Syntax

obj = ClassName()

Example

class Car:
    brand = "Toyota"

c1 = Car()
print(c1.brand)

Output

Toyota
Example

🏋️ Test Yourself With Exercises

Take our quiz on Object to test your knowledge.

Browse Quizzes »