converting a list into a tuple?
Martin Franklin
martin.franklin at westerngeco.com
Thu May 24 06:33:19 EDT 2001
Martin Franklin wrote:
> "Harvest T. Moon" wrote:
>
> > how do i convert
> >
> > mylist = ["foo", "bar"]
> >
> > into
> >
> > mytuple = ("foo", "bar")
> >
> > i think it must be easy ... but ... umm ... :)
> >
> > Harvest T. Moon
> > -- a life less ordinary!!
>
> try:
>
> mytuple=tuple(mylist)
>
> Thanks
>
> Martin.
see section 2.3 Built-in Functions of the Python library reference
for all other errr - built in functions........
Martin
More information about the Python-list
mailing list