[Tutor] Number of elements in a list

Bernard Lebel python at bernardlebel.com
Sat Aug 14 00:07:06 CEST 2004


Forget that. len() is what I was after.



----- Original Message ----- 
From: "Bernard Lebel" <python at bernardlebel.com>
To: <tutor at python.org>
Sent: Friday, August 13, 2004 11:02 PM
Subject: [Tutor] Number of elements in a list


> 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
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
>



More information about the Tutor mailing list