List Question

Sean 'Shaleh' Perry shalehperry at comcast.net
Mon Jul 28 20:04:01 EDT 2003


On Sunday 27 July 2003 16:18, Bill Loren wrote:
> Thanks all,
> and again, accept my apologizes for the stupid question...
> *blushed* B
>

not really a stupid question.  People ask it fairly regularly.  Many expect 
something like my_list.length() to work (hey, Python is OO after all).

The typical response is len() works pretty much any where that len() would 
make sense.

strings, tuples, lists, user defined classes as long as it honors __len__(), 
etc.






More information about the Python-list mailing list