number of values in a list

Steve Holden sholden at holdenweb.com
Sun Dec 2 18:19:28 EST 2001


"Andreas Penzel" <mail at andreas-penzel.de> wrote ...
> Hello NG!
> 
> I have a list and want to know the number of values.
> Example: abc = [5,10,15,20,25,30]
> result should be: 6
> 
You're looking for the len() function.

len([5,10,15,20,20,30]) == 6

regards
 Steve
-- 
http://www.holdenweb.com/








More information about the Python-list mailing list