list to tuple conversion
Pekka Laukkanen
peke at iki.fi
Wed Oct 1 03:58:25 EDT 2008
2008/10/1 sc <nospam at spamhaters.com>:
> If there were a builtin function that took a list and
> returned a tuple, I'd be there, but if there is such a
> thing I need someone to point me at it. I can't help
> thinking I am missing some obvious construct, and I'll
> be advised to go reread the tutorial, but I'm not there,
> and if you can take pity on me and point me there, I'll
> be your friend for life. Well -- I'll be grateful...
>>> tuple
<type 'tuple'>
>>> tuple([1,2,3])
(1, 2, 3)
More information about the Python-list
mailing list