(word, glossary)
Isolate a glossary present inside a word.

    Returns a list of subwords. In which all 'glossary' glossaries are isolated 

    For example, if 'USA' is the glossary and '1934USABUSA' the word, the return value is:
        ['1934', 'USA', 'B', 'USA']
Isolate a glossary present inside a word.
Isolate a glossary present inside a word .
def isolate_glossary(word, glossary):
    """
    Isolate a glossary present inside a word.

    Returns a list of subwords. In which all 'glossary' glossaries are isolated 

    For example, if 'USA' is the glossary and '1934USABUSA' the word, the return value is:
        ['1934', 'USA', 'B', 'USA']
    """
    if word == glossary or glossary not in word:
        return [word]
    else:
        splits = word.split(glossary)
        segments = [segment.strip() for split in splits[:-1]
                    for segment in [split, glossary] if segment != '']
        return segments + [splits[-1].strip()] if splits[-1] != '' else segments
def isolate_glossary ( word , glossary ) : if word == glossary or glossary not in word : return [ word ] else : splits = word . split ( glossary ) segments = [ segment . strip ( ) for split in splits [ : - 1 ] for segment in [ split , glossary ] if segment != '' ] return segments + [ splits [ - 1 ] . strip ( ) ] if splits [ - 1 ] != '' else segments