Skip to content

Conversation

@brian8128
Copy link

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']

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']
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant