Re: Size of list

2006-02-06 Thread Schüle Daniel
>>> lst = [1,2,3] >>> len(lst) 3 >>> lst.__len__() 3 in genereal all objects which implements __len__ can be passed to built-in function len >>> len just to give one example how this can be used >>> class X(object): ... def __len__(self): ... print "this instance has __len_

Re: Size of list

2006-02-06 Thread Ernesto
Thanks ! -- http://mail.python.org/mailman/listinfo/python-list

Re: Size of list

2006-02-06 Thread limodou
6 Feb 2006 08:32:18 -0800, Ernesto <[EMAIL PROTECTED]>: > for line in PM_File_Handle.readlines(): > PM_fields = line.split(';') > > # Is there a way to get the size of PM_Fields here ? > # Something like > > size = PM_fields.size( ) > > # I could not find this attribute in the python docs.