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
Post a Comment