MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / split_input

Function split_input

strings/string_switch_case.py:19–24  ·  view source on GitHub ↗

>>> split_input("one two 31235three4four") [['one', 'two', '31235three4four']]

(str_: str)

Source from the content-addressed store, hash-verified

17
18# assistant functions
19def split_input(str_: str) -> list:
20 """
21 >>> split_input("one two 31235three4four")
22 [['one', 'two', '31235three4four']]
23 """
24 return [char.split() for char in re.split(r"[^ a-z A-Z 0-9 \s]", str_)]
25
26
27def to_simple_case(str_: str) -> str:

Callers 2

to_simple_caseFunction · 0.85
to_complex_caseFunction · 0.85

Calls 1

splitMethod · 0.80

Tested by

no test coverage detected