Oct. 26, 2023, 9:02 a.m. | Nicolas Frankel

DEV Community dev.to

Let's continue our exploration of Python's magic methods in this second part of the series. This part will focus on numbers and containers, i.e., collections. You can read the first part here.





Container-related methods


Python provides the usual containers, e.g., lists, sets, and dictionaries. You can use the following methods when you want to implement your own.





Common methods


Containers have a size. Python defines two methods to implement to return the number of items in a …

containers exploration focus lists magic numbers part python series

Software Engineer for AI Training Data (School Specific)

@ G2i Inc | Remote

Software Engineer for AI Training Data (Python)

@ G2i Inc | Remote

Software Engineer for AI Training Data (Tier 2)

@ G2i Inc | Remote

Data Engineer

@ Lemon.io | Remote: Europe, LATAM, Canada, UK, Asia, Oceania

Artificial Intelligence – Bioinformatic Expert

@ University of Texas Medical Branch | Galveston, TX

Lead Developer (AI)

@ Cere Network | San Francisco, US