Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- s1 = "!"
- l1 = ['one', 'two', 'three']
- s2 = s1.join(l1)
- print(s2) # one!two!three
- s3 = "_WoW_".join(l1)
- print(s3) # one_WoW_two_WoW_three
- s4 = "*_*".join(['lala', 'lolo', 'lele'])
- print(s4) # lala*_*lolo*_*lele
- s5 = "".join(['a', 'b', 'c'])
- print(s5) # abc
- s6 = "what are you doing?"
- l2 = s6.split(" ")
- print(l2) # ['what', 'are', 'you', 'doing?']
- s7 = "one:two:three"
- l3 = s7.split(":")
- print(l3) # ['one', 'two', 'three']
- s8 = "hello world"
- l4 = s8.split('o')
- print(l4) # ['hell', ' w', 'rld']
- s9 = "Hello, mtt, 08.67"
- spl = ", "
- l5 = s9.split(spl)
- print(l5) # ['Hello', 'mtt', '08.67']
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement