snippet summoner

fukurou

the supreme coder
ADMIN
Python:
class SnippetSummonerStr:
    #  funnels strings into lookup keys
    def __init__(self):
        self.incantations: set[str] = set()
        self.exclusions: set[str] = set()

    def getSummonerStr(self, str1:str)->str:
        # check for summon incantation in str start
        for item in self.incantations:
            if str1.startswith(item):
                # clean out none relevant lookup phrases
                for item1 in self.exclusions:
                    str1 = str1.replace(item1, "")
                    # ret alphabetized cleaned result
                    return " ".join(sorted(str1.split()))
        return ""
 
Top