Quiz: Python's len() Function

2026-10-13来源 Real PythonEnglish

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.


[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]

原文:https://www.a8q9.cn/en/article/quiz-python-s-len-function-25bc56.html

相关文章