What is a object in Python

Blender is 3d object. Python is object oriented programming language. I am studying Python but I can’t figure what they mean by object.

learn about OOP:

python is nice because everything is an object, even a simple integer.

And here is how you can know an integer is a object, write at the python prompt:

dir(21)

gives you

>>> dir(21)
[‘abs’, ‘add’, ‘and’, ‘class’, ‘cmp’, ‘coerce’, ‘delattr’, ‘div’, ‘divmod’, ‘doc’, ‘float’, ‘floordiv’, ‘getattribute’, ‘getnewargs’, ‘hash’, ‘hex’, ‘index’, ‘init’, ‘int’, ‘invert’, ‘long’, ‘lshift’, ‘mod’, ‘mul’, ‘neg’, ‘new’, ‘nonzero’, ‘oct’, ‘or’, ‘pos’, ‘pow’, ‘radd’, ‘rand’, ‘rdiv’, ‘rdivmod’, ‘reduce’, ‘reduce_ex’, ‘repr’, ‘rfloordiv’, ‘rlshift’, ‘rmod’, ‘rmul’, ‘ror’, ‘rpow’, ‘rrshift’, ‘rshift’, ‘rsub’, ‘rtruediv’, ‘rxor’, ‘setattr’, ‘str’, ‘sub’, ‘truediv’, ‘xor’]

This is, a list of the methods for an integer-object. (They have the underscores, because these methods are not to meant to be called as is, but through the arithmetic operations.)

feejo, the object in “object oriented programming” means that data and methods get packed together in a single unit that can be passed around as a whole. That unit is called an object, but isn’t much like physical objects at all. You’re better off keeping them separate in your head.