What is the syntax to join a sequence, separated by a string?

<string name>.join(<sequence>)
#examples
str = "-"
str2 = "! "
str3 = ""
seq1 = ("1","2","3")
seq2 = ('Ursula', 'Yves','Pedro', 'Bernice')

print(str.join(seq1))
print(str2.join(seq2))
print(str3.join(seq2))

#output
1-2-3
Ursula! Yves! Pedro! Bernice
UrsulaYvesPedroBernice

 

 

Advertisements