4 ms·
On the other hand, .split() with no argument splits on any amount of whitespace (\s+, as a regex). That's often quite a useful edge case to have handled for you
by takluyver 14y ago
On the other hand, .split() with no argument splits on any amount of whitespace (\s+, as a regex). That's often quite a useful edge case to have handled for you. You can also do .split(c, 1) to limit it to a single split. It could still split 0 times, though - it just depends which edge cases you want to handle.