- join() is a python in-build function which convert the given sequence into the string.this sequence may be list, tuple , set and range.
syntax is ''.join(seq)
Example
list is ["one","two","third"]
string we want is "one-two-third"
program-
#join on list
l=["one","two","three"]
s='-'.join(l)
print(s)
s=''.join(l)
print(s)
s=','.join(l)
print(s)
s='/'.join(l)
print(s)
#join on set
s=set(['1','2','3'])
ans='-'.join(s)
print(ans)
ans=''.join(s)
print(ans)
ans=','.join(s)
print(ans)
ans='/'.join(s)
print(ans)
one-two-three
onetwothree
one,two,three
one/two/three
2-3-1
231
2,3,1
2/3/1