xxxxxxxxxx
# use of join function to join list
# elements without any separator.
# Joining with empty separator
list1 = ['g','e','e','k', 's']
print("".join(list1))
#Output:
geeks
xxxxxxxxxx
test_string = " ".join(['Test', 'the', 'join()', 'method'])
print(test_string)
[output]
'Test the join() method'
xxxxxxxxxx
numList = ['1', '2', '3', '4']
separator = ', '
print(separator.join(numList))
xxxxxxxxxx
w=["as","3e","1"]
a='vf'.join(w)
// w neccessarily needs to be a list of strings.
print(a)
//displays string asvf3evf1