Python Basics
Python Advanced
Python Useful References
Python Useful Resources
Selected Reading
© 2011 TutorialsPoint.COM
|
Python String join() Method
Description:
This method returns a string in which the string elements of sequence have been joined by str separator.
Syntax:
Parameters:
Here is the detail of parameters:
Return Value:
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.
Example:
#!/usr/bin/python
str = "-";
seq = ("a", "b", "c"); # This is sequence of strings.
print str.join( seq );
|
This will produce following result:
|
|
|