Anonymous user
Multisplit: Difference between revisions
→Not using RE's: Handle edge cases consistently
m (→Using Regular expressions: handle edge cases consistently.) |
(→Not using RE's: Handle edge cases consistently) |
||
Line 67:
===Not using RE's===
<lang python>>>> def ms(txt="a!===b=!=c", sep=["==", "!=", "="]):
if not txt or not sep:
return []
size = [len(s) for s in sep]
ans, pos0 = [], 0
|