[Tutor] Number of elements in a list

Kent Johnson kent_johnson at skillsoft.com
Fri Aug 13 23:08:45 CEST 2004

print len(myList)

It's not a member function, it's a builtin.


At 11:02 PM 8/13/2004 +0100, Bernard Lebel wrote:
>A very basic question: how can I print the number of elements in a list? I'm
>not talking about the elements, just their count...
>Something like
>print myList.length
>print myList.count
>Tutor maillist  -  Tutor at python.org

More information about the Tutor mailing list