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
- numpy string operations | join() function
- Python | os.path.join() method
- Python program to split and join a string
- Python | Join tuple elements in a list
- Python | Merge, Join and Concatenate DataFrames using Panda
- Python | Ways to join pair of elements in list
- Python String Methods | Set 2 (len, count, center, ljust, rjust, isalpha, isalnum, isspace & join)
- Join two text columns into a single column in Pandas
- ord() function in Python
- Python | How to get function name ?
- Python map() function
- sum() function in Python
- id() function in Python
- Python | cmp() 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.