Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
Ranked #107.55K
~153.60K People Reached
Favorite Forums
Favorite Tags

1 Posted Topic

Member Avatar for shak187

from re import compile candidates = ["doconeument", "documdocumentent", "documentone", "pydocdbument", "documentdocument", "hansi"] word = "document" def strip_word(word, candidate): regex = compile("^(.*)" + "(.*)".join(word) + "(.*)$") match = regex.match(candidate) if not match: return candidate return strip_word(word, "".join(match.groups())) for cand in candidates: print(f"'{cand}' -> '{strip_word(word, cand)}'")

Member Avatar for eliasarximan
2
154K

The End.