Is their any functions in python to join a list of strings to a single string ?

we know that function has rich set of built in functions in python, so the answer is off course their is a functions in python to join a list of strings to a single string .as the name suggest join() is the function in python to join a list of strings to a single string.Let we check the syntax of join().

string.join(list)

where string is the separator string and list is a list of strings

Example of join function in python

item= [‘ Hello’, ‘good morning ‘]

string = ‘,’.join(item)

print(string)

any functions in python to join a list of strings to a single string

My Thought

Your email address will not be published. Required fields are marked *