How do I get the length of a list? - Stack Overflow
https://stackoverflow.com/questions/1712227/how-do-i-get-the-number-of-elements-in-a-list-length-of-a-list-in-python
WEBNov 11, 2009 · class slist(list): @property def length(self): return len(self) You can use it like so: >>> l = slist(range(10)) >>> l.length 10 >>> print l [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] Essentially, it's exactly identical to a list object, with the added benefit of having an OOP-friendly length property. As always, your mileage may vary.
DA: 28 PA: 87 MOZ Rank: 64