我有一个元组:
tuple = ('one', ('two', 'three'))
我想打印删除 ' 从这个元组中,我可以把它打印成 (one, (two, three)) .
'
(one, (two, three))
我试过了
tuple = str(tuple) print tuple.strip(')
但我有个错误:
print tuple.strip(') ^ SyntaxError: EOL while scanning string literal
如何将元组转换为所需的字符串?