Copyright © tutorialspoint.com
This method returns a string in which the string elements of sequence have been joined by str separator.
str.join(sequence) |
Here is the detail of parameters:
sequence: sequence of the elements to be joined.
It returns a string which is the concatenation of the strings in the sequence seq. The separator between elements is the string providing this method.
#!/usr/bin/python str = "-"; seq = ("a", "b", "c"); # This is sequence of strings. print str.join( seq ); |
This will produce following result:
a-b-c |
Copyright © tutorialspoint.com