A Counterintuitive Fact About Python Functions

Python is simple, but at times, can feel a bit tricky as well.

Everything in python is an object instantiated from some class. This also includes functions, but accepting this fact often feels counterintuitive at first.

Here are a few ways to verify that python functions are indeed objects.

The friction typically arises due to one's acquaintance with other programming languages like C++ and Java, which work very differently.

However, python is purely an object-oriented programming (OOP) language. You are always using OOP, probably without even realizing it.

👉 Read what others are saying about this post on LinkedIn: Post Link.

👉 If you liked this post, leave a heart react 🤍.

👉 If you love reading this newsletter, feel free to share it with friends!

Find the code for my tips here: GitHub.

I like to explore, experiment and write about data science concepts and tools. You can read my articles on Medium. Also, you can connect with me on LinkedIn.

Reply

or to participate.