Created
November 5, 2017 14:23
-
-
Save jerrypy/febf37cf4b216ef631721bedc3cbf707 to your computer and use it in GitHub Desktop.
MIT 6.00 Assignments solution
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from ps3b import subStringMatchExact | |
from ps3c import subStringMatchOneSub | |
def subStringMatchExactlyOneSub(target, key): | |
t1 = subStringMatchExact(target, key) | |
t2 = subStringMatchOneSub(target, key) | |
ans = () | |
for i in t2: | |
if i not in t1: | |
ans += (i, ) | |
return ans |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment