mirror of
https://github.com/satwikkansal/wtfpython.git
synced 2025-08-22 12:52:55 +02:00
Merge remote-tracking branch 'origin/master' into 3.0
This commit is contained in:
1
README.md
vendored
1
README.md
vendored
@@ -290,7 +290,6 @@ Makes sense, right?
|
||||
```
|
||||
|
||||
#### 💡 Explanation:
|
||||
|
||||
- It might appear at first that the default seperator for split is a single space `' '`, but as per the [docs](https://docs.python.org/2.7/library/stdtypes.html#str.split),
|
||||
> If sep is not specified or is None, a different splitting algorithm is applied: runs of consecutive whitespace are regarded as a single separator, and the result will contain no empty strings at the start or end if the string has leading or trailing whitespace. Consequently, splitting an empty string or a string consisting of just whitespace with a None separator returns `[]`.
|
||||
> If sep is given, consecutive delimiters are not grouped together and are deemed to delimit empty strings (for example, `'1,,2'.split(',')` returns `['1', '', '2']`). Splitting an empty string with a specified separator returns `['']`.
|
||||
|
Reference in New Issue
Block a user