A REALLY COOL PYTHON FEATURE:

François Pinard pinard at iro.umontreal.ca
Tue May 16 12:13:31 EDT 2000


Robert Citek <rwcitek at uci.edu> writes:

> The join method is fine for converting lists to strings, but doesn't work
> for converting lists to tuples.  However, lambda works nicely here:

> reduce(lambda x, y: x + (y,), somenames, ())

Why not just  tuple(somenames)  ?

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard






More information about the Python-list mailing list