#is target in base?
def findSubstring(base, target):
match = ""
for x in range(0, len(base)):
substring = base[0:len(base)-x]
if substring == target:
print("there is a match")
match = substring
if match == "":
return ""
else:
return match
print(findSubstring("aaaaaaa", "aaa"))