Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

converting tuple into string

# 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)
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #converting #tuple #string
ADD COMMENT
Topic
Name
4+2 =