ABC words: Difference between revisions
→{{header|Python}}
Line 2,374:
# residue (String, Char) -> String -> Maybe String
def residue(
'''Any characters remaining in s after c, unless
c is preceded by excluded characters.
Line 2,381:
if s:
x = s[0]
return None if x in
s[1:] if c == x else go(s[1:])
)
else:
return None
return go
|