Does anyone know what's the use of Object-oriented python?

Hi guys!

Hope everyone is having a lovely day! :slight_smile: By any chance, does anyone know what’s the purpose of object-oriented python? how do we use it in day to day python?

Thank you!

Python is an object-oriented programming language. Basically everything in python is an object: lists, dictionaries, tuples, strings, DataFrames, Series. Each of those is a Class with its own methods. Some of them are built-in the language, such as lists, tuples, and dictionaries. Others were created by the python community, such as DataFrames and Series from pandas.

Some benefits of object-oriented programming are:

  • object-oriented programming allows you to create large, modular programs that can easily expand over time;
  • object-oriented programs hide the implementation from the end-user.

Python packages like Scikit-learn, pandas, and NumPy are all built with object-oriented programming.

You can read more about it on the following links:

https://docs.python.org/3/tutorial/classes.html

https://www.programiz.com/python-programming/object-oriented-programming

1 Like