Python: object() function
object() function
The object() function is used to create an empty object.
Object is a base for all classes. It has the methods that are common to all instances of Python classes.
Version:
(Python 3.2.5)
Syntax:
object
Parameter:
This function does not accept any arguments.
Return value:
A new featureless object.
Example: Python object() function
Example = object()
print(type(Example))
print(dir(Example))
Output:
<class 'object'> ['__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__']
Python Code Editor:
Test your Python skills with w3resource's quiz
It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.
https://www.w3resource.com/python/built-in-function/object.php
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics