Clever little example that shows how flexible Python’s dunder methods can be. It’s a neat reminder that even simple overrides can completely change built-in behaviour. Could this kind of trick be useful in real projects, or is it more of a teaching tool?
Always Five Trick → Class always returns 5 no matter what when you use len().
1 Comment
🔥 Join developers growing publicly
Share your knowledge, build in public, and grow your developer presence with a global community.
chevron_left