3 ms·
I agree. Join should word the same as split: >>> "abcbe".split("b") ['a', 'c', 'e'] So to get back the original string you should be able to say: ['
by cabalamat 18y ago
I agree. Join should word the same as split:
>>> "abcbe".split("b")
['a', 'c', 'e']
So to get back the original string you should be able to say:
['a', 'c', 'e'].join("b") #!!! WRONG !!!
but this doesn't work and instead you have to say:
>>> "b".join(['a', 'c', 'e'])
'abcbe'