Python's len() Function Quiz
Interactive Quiz ⋅ 7 Questions
By Joseph Peart
In this quiz, you’ll test your understanding of Python’s len() Function.
By working through this quiz, you’ll revisit which objects len() accepts, how it behaves
with NumPy arrays and pandas DataFrames, and how to support it in your own classes.
Along the way, you’ll see why one small function can work on everything from built-in containers to the classes you write.
The quiz contains 7 questions and there is no time limit. You’ll get 1 point for each correct answer. At the end of the quiz, you’ll receive a total score. The maximum score is 100%. Good luck!
Related Resources
Course
Python's len() Function
In this course, you'll learn how and when to use the len() Python function. You'll also learn how to customize your class definitions so that objects of a user-defined class can be used as arguments in len().