Simple question, how do you tell how many items in a list?
Vlastimil Brom
vlastimil.brom at gmail.com
Fri Jul 11 02:22:51 EDT 2008
2008/7/11, Alex Bryan <alexnbryan at gmail.com>:
>
> I am just wondering how you get an integer value for how many items there
> are in a list, preferably w/o a for loop.
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
Use len
>>> len([1,2,3])
3
>>>
vbr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080711/cb50983b/attachment-0001.html>
More information about the Python-list
mailing list