3 ms·
> "".join(["a", "b"]) is a lot more intuitive than sum(["a", "b"], start="") No it isn't. The join method being on the separator string is a Pythonism that loo
by lmm 7y ago
> "".join(["a", "b"]) is a lot more intuitive than sum(["a", "b"], start="")
No it isn't. The join method being on the separator string is a Pythonism that looks crazy coming from any other language.
- theelous3 7y agoThe point they are making is that join(xs, "") xs.join("") or whatever else you want to come up with is more readable than building more string stuff in to sum, not that having join be a str method is the best way.