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

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

PostgreSQL 9.x - pg_read_binary_file & inserting files into bytea -

asp.net - call stack missing info on mono with apache and mod_mono -