# Python3 code to convert a tuple
# into a string using str.join() method
def convertTuple(tup):
str = ''.join(tup)
return str
# Driver code
tuple = ('h','e','l','l',' ','w','o','r','l','d')
str = convertTuple(tuple)
print(str)
tuple_ = 1, 2, 3, 4, 5
str(list(tuple))
# Python3 code to convert a tuple
# into a string using a for loop
def convertTuple(tup):
# initialize an empty string
str = ''
for item in tup:
str = str + item
return str
# Driver code
tuple = ('g', 'e', 'e', 'k', 's')
str = convertTuple(tuple)
print(str)
''.join(('f', 'i', 'r', 'e')) # "fire"