Posted on 23rd April 2024
Let us see a program for converting an array to string
# Function that convert
def listToString(s):
#let us initialize an empty string first
str = ""
# next traverse within the string
for ele in s:
str += ele
# returning the string
return str
# Driver code
s1 = [‘mind’,’majix’]
print(listToString(s1))
Output:
mindmajix
STILL GOT QUERIES?