mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 17:34:49 +08:00
Tighten up psf/black and flake8 (#2024)
* Tighten up psf/black and flake8 * Fix some tests * Fix some E741 * Fix some E741 * updating DIRECTORY.md Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
@ -1,16 +1,16 @@
|
||||
def split(string: str, separator: str = " ") -> list:
|
||||
"""
|
||||
Will split the string up into all the values separated by the separator (defaults to spaces)
|
||||
|
||||
|
||||
>>> split("apple#banana#cherry#orange",separator='#')
|
||||
['apple', 'banana', 'cherry', 'orange']
|
||||
|
||||
|
||||
>>> split("Hello there")
|
||||
['Hello', 'there']
|
||||
|
||||
|
||||
>>> split("11/22/63",separator = '/')
|
||||
['11', '22', '63']
|
||||
|
||||
|
||||
>>> split("12:43:39",separator = ":")
|
||||
['12', '43', '39']
|
||||
"""
|
||||
|
Reference in New Issue
Block a user