Changing Unicode object to Tuple Type

John Machin sjmachin at lexicon.net
Thu May 24 08:14:22 EDT 2007


On May 24, 9:45 pm, laxmikiran.ba... at gmail.com wrote:
> Can we have change a unicode string Type object  to a Tuple type
> object.. If so how ????

>>> x = u'fubar'
>>> y = tuple(x)
>>> y
(u'f', u'u', u'b', u'a', u'r')
>>> type(x)
<type 'unicode'>
>>> type(y)
<type 'tuple'>
>>>

But I'm quite sure that's not the question you should be asking :-)




More information about the Python-list mailing list