Skip to content

Object-Oriented Programming

Get and Check Type of a Python Object type() and isinstance() Cover Image

Get and Check Type of a Python Object: type() and isinstance()

In this tutorial, you’ll learn how to get and check the type of a Python object using the type() and isinstance() functions. Everything in Python is an object and knowing what the object’s type is allows you to make better-informed

Python setattr Function Explained Cover Image

Python setattr() Function Explained

In this tutorial, you’ll learn about the Python setattr() function, including what it does, when to use it, and when it’s redundant to use it. The function is used to set an attribute to a value of an object, whether

Python isinstance() Function Explained with Examples Cover image

Python isinstance() Function Explained with Examples

In this tutorial, you’ll learn how the Python isinstance function works and how it can be used in your Python programming. The Python isinstance() function allows you to check if an object belongs to a particular data type or class.

Python Object-Oriented Programming (OOP) for Data Science Cover Image

Python Object-Oriented Programming (OOP) for Data Science

In this tutorial, you’ll learn about Python object-oriented programming (OOP) and how to it relates to the domain of data science. Object-oriented programming can be a concept that’s hard to grasp. This tutorial aims to explain this important concept in

Python Print All Object Properties Cover Image

Python: Print an Object’s Attributes

Learn how to print all of a Python object’s attributes using the dir() and vars() functions, and how to print pretty using the pprint module.