Python join () method
Description Python join () method is used to specify the elements of a sequence is connected to generate a new character string.
Syntax join () method syntax:
str.join(sequence)
Parameter
sequence - a sequence of elements to be connected.
return value
Returns a new string generated after the sequence of elements connected by a specified character.
EXAMPLES The following examples illustrate the join () method is used:
STR = " - " ;
seq = ("a", "b", "c");
# String sequence Print STR . The Join ( SEQ ) ;
Examples of the above output results are as follows:
a-b-c
This switched
↓↓↓↓↓↓↓↓↓↓↓↓↓↓