Created
May 30, 2014 20:16
-
-
Save spitz-dan-l/466f13c90c5bebce761f to your computer and use it in GitHub Desktop.
This file contains 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
def remove_spans_neg(s, spans): | |
return ''.join(s[i:j] for (_, i), (j, _) in zip([(None,0)]+spans, spans+[(len(s),None)])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment