string-split

Why does str.split not take keyword arguments?

Why does str.split not take keyword arguments? Question: I came across this – in my view – strange behaviour: “a b c”.split(maxsplit=1) TypeError: split() takes no keyword arguments Why does str.split() not take keyword arguments, even though it would make sense? I found this behavior both in Python2 and Python3. Asked By: Peter Smit || …

Total answers: 2