python - Tuple to string -


i have tuple.

tst = ([['name', u'bob-21'], ['name', u'john-28']], true) 

and want convert string..

print tst2 "([['name', u'bob-21'], ['name', u'john-28']], true)" 

what way this?

thanks!

tst2 = str(tst) 

e.g.:

>>> tst = ([['name', u'bob-21'], ['name', u'john-28']], true) >>> tst2 = str(tst) >>> print tst2 ([['name', u'bob-21'], ['name', u'john-28']], true) >>> repr(tst2) '"([[\'name\', u\'bob-21\'], [\'name\', u\'john-28\']], true)"' 

Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -