cuad icon indicating copy to clipboard operation
cuad copied to clipboard

Use pythons default split function

Open brian8128 opened this issue 4 years ago • 0 comments

The default split function is better than splitting just on spaces. Consider the following two examples.

"The    quick brown\n fox".split()
['The', 'quick', 'brown', 'fox']

vs

"The    quick brown\n fox".split(" ")
['The', '', '', '', 'quick', 'brown\n', 'fox']

brian8128 avatar Apr 12 '21 21:04 brian8128