Other Properties, Attributes, and Methods

Learn about container objects, dynamic attributes for objects, and callable objects in Python.

Container objects

Containers are objects that implement a __contains__ method (which usually returns a Boolean value). This method is called in the presence of the in keyword in Python and looks something like this:

Get hands-on with 1200+ tech skills courses.