Re: List--->Tuple?

Jim Roskind (jar@infoseek.com)
Tue, 4 Apr 1995 21:36:02 -0700

> From: marko@CS.Stanford.EDU (Marko Balabanovic)
> Date: 4 Apr 1995 23:24:12 GMT
>
> Is there an easy way to convert a list to a tuple?

Consider the use of the builtin function "tuple()"

Python 1.1.1 (Feb 3 1995)
Copyright 1991-1994 Stichting Mathematisch Centrum, Amsterdam
>>> tuple([1,2])
(1, 2)
>>>

This gets mentioned here on the list now and then, but it should
probably be in the faq as well (I just went and looked for it, and
didn't find it).

Jim

-- 
Jim Roskind
voice: 408.982.4469 (or Florida: 407.729.4348)
fax: 408.986.1889   (or Florida: 407.952.2448)
jar@infoseek.com
----------------------------------------------------------------------------
PGP 2.6.2 Key fingerprint =  0E 2A B2 35 01 9B 5C 58  2D 52 05 9A 3D 9B 84 DB 
To get my PGP 2.6 Public Key, "finger -l jar@infoseek.com | pgp -kaf"