Lists and Tuples

Fredrik Lundh fredrik at pythonware.com
Sun Dec 7 06:38:35 EST 2003


Skip Montanaro wrote:

>     >> list = [ x for x in tuple ]
>
>     Roy> What's wrong with the even simplier:
>
>     Roy> aList = list (aTuple)
>
> It doesn't use the language feature du jour. ;-)

list comprehensions have been around for ages.  to show off,
you'll need to get itertools and generators into the mix.

</F>








More information about the Python-list mailing list