Python Object() function
Published February 16, 2022The object() function is a Python built-in function that returns an empty object, which is the base of all classes. Objects returned by this method are unique and cannot be modified in any way.
Syntax
The syntax of the object() is:
Object() |
If this function doesn't have any parameters, then the object will return an empty object.
Lets see how this function works in the example below
Example
x = object() |
Output
The above code returns an empty object
The cfeated class is : |
Article Contributed By :
|
|
|
|
369 Views |