Computer >> Computer tutorials >  >> Programming >> Python

How can I convert a Python tuple to string?


To convert to tuple of string objects into a single string, you can use join() function. Ensure that trget string is initialised to null string

>>> T1='1','2','3'
>>> s=''.join(T1)
>>> s
'123'