Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
break else break solution in Creative category for Keywords Finder by veky
def checkio(text, words):
hi = [set(range(i, i + len(word))) for word in words.lower().split()
for i in range(len(text)) if text.lower()[i:].startswith(word)]
while True:
for s, t in __import__("itertools").permutations(hi, 2):
if s & t: hi.remove(s); hi.remove(t); hi.append(s | t); break
else: break
t = list(text)
for s in sorted(hi, key=min, reverse=True):
a, b = min(s), max(s) + 1; t[b:b] = ""; t[a:a] = ""
return "".join(t)
March 12, 2014
Comments: