Created
March 10, 2018 06:00
-
-
Save R4CHI7/91ff56dbdcdf3ba2bc96eb5cebec5ff4 to your computer and use it in GitHub Desktop.
Split problem statement
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cases = [ | |
(' mte st m', ' ', ['', '', 'mte', '', 'st', 'm']), | |
('mtestm', ' ', ['mtestm']), | |
('mtestm', 'm', ['', 'test', '']), | |
('mmadfmm', 'm', ['', '', 'adf', '', '']), | |
('sfd 423', ' ', ['sfd', '', '', '423']), | |
('hello', ' ', ['hello']), | |
] | |
for i, (S, sep, expected_op) in enumerate(cases): | |
op = split(S, sep) | |
if op != expected_op: | |
print(i, S, sep, op, expected_op) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment