The join() method is a string method and returns a string in which the elements of sequence have been joined by str separator.
string_name.join(iterable) string_name: It is the name of string in which joined elements of iterable will be stored.
Parameters: The join() method takes iterable – objects capable of returning its members one at a time. Some examples are List, Tuple, String, Dictionary and Set
Return Value: The join() method returns a string concatenated with the elements of iterable.
Type Error: If the iterable contains any non-string values, it raises a TypeError exception.
Below program illustrates the working of join() method:
Joining with empty string.
- Python | Pandas str.join() to join string/list elements with passed delimiter
- Python | os.path.join() method
- Python | Join cycle in list
- numpy string operations | join() function
- Python program to split and join a string
- Python | Join tuple elements in a list
- Python | Ways to join pair of elements in list
- Python | Merge, Join and Concatenate DataFrames using Panda
- Python String Methods | Set 2 (len, count, center, ljust, rjust, isalpha, isalnum, isspace & join)
- Join two text columns into a single column in Pandas
- Python | now() function
- Help function in Python
- id() function in Python
- sum() function in Python
- Python | oct() function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.