List Question

Gonçalo Rodrigues op73418 at
Mon Jul 28 13:18:33 CEST 2003

On Mon, 28 Jul 2003 00:23:46 +0200, "Bill Loren"
<lorenb2 at> wrote:

>Forgive my python newbieness.
>Assume I have a list named heck_of_a_list.
>how would I extract the number of elements out of it ?
>(I'm looking for something like perl's $#heck_of_a_list operand)

Firing the interpreter:

>>> heck_of_a_list = []
>>> len(heck_of_a_list)

Maybe you would like to peruse the tutorial that comes with Python.
It's a very nice intro and it may answer some (a lot?) of your newbie

With my best regards,
G. Rodrigues

More information about the Python-list mailing list