Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 325 Bytes

objects.md

File metadata and controls

24 lines (19 loc) · 325 Bytes

Back

Objects


An object (instance) is an instantiation of a class.

Example:

obj = Dog()

Here, obj is object of class Dog.

Example:

a = Dog()
b = Dog()
a == b # False, They are different objects.
a = Dog()
type(a) # <class '__main__.Dog'>