On May 13, 6:57 pm, Nikhil <[EMAIL PROTECTED]> wrote: > which one is better? and why? > > __len__() is a built-in function of the list object and is updated along > with the list object elements and will be useful incase the list is very > huge. > > len() is an external method again, which may require the processing > cycles again. > > Is it right?
len() is the correct way to do it, methods that begin with __ are meant to be more internal. -- http://mail.python.org/mailman/listinfo/python-list