Size of list

limodou limodou at gmail.com
Mon Feb 6 11:41:04 EST 2006


6 Feb 2006 08:32:18 -0800, Ernesto <erniedude at gmail.com>:
> 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.  Thanks

try:

size = len(PM_fields)

--
I like python!
My Blog: http://www.donews.net/limodou
NewEdit Maillist: http://groups.google.com/group/NewEdit



More information about the Python-list mailing list