[Tutor] Number of elements in a list

Bernard Lebel python at bernardlebel.com
Sat Aug 14 00:02:13 CEST 2004


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
or
print myList.count


Thanks
Bernard



More information about the Tutor mailing list