Why does Python code use len() function instead of a length method?

Published: 04 March 2023
on channel: The Python Oracle
2
0

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Hypnotic Puzzle2

--

Chapters
00:00 Question
00:24 Accepted answer (Score 197)
01:04 Answer 2 (Score 110)
02:48 Answer 3 (Score 40)
04:59 Answer 4 (Score 36)
05:13 Thank you

--

Full question
https://stackoverflow.com/questions/2...

Accepted answer links:
[len()]: http://www.python.org/doc/2.5.2/lib/b...
[Emulating container types]: http://www.python.org/doc/2.5.2/ref/s...
[Python and the Principle of Least Astonishment]: http://lucumr.pocoo.org/2011/7/9/pyth...

Answer 2 links:
[this question]: https://stackoverflow.com/questions/8...

Answer 3 links:
[PyVarObject]: http://hg.python.org/cpython/file/8c8...
[Python Data Model]: https://docs.python.org/3.4/reference...
[this one]: http://effbot.org/pyfaq/why-does-pyth...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/l...

--

Tags
#python

#avk47


On this page of the site you can watch the video online Why does Python code use len() function instead of a length method? with a duration of hours minute second in good quality, which was uploaded by the user The Python Oracle 04 March 2023, share the link with friends and acquaintances, this video has already been watched 2 times on youtube and it was liked by 0 viewers. Enjoy your viewing!