Real Python·
Quiz: Python's len() Function
TL;DR
This seven-question quiz tests your understanding of which objects Python’s len() function accepts, including NumPy arrays, pandas DataFrames, and custom classes. It reviews how the function behaves across these objects and how to support it in your own classes, then gives you a score to check your knowledge.
Relevant links
Sign in to save links