def __init__(self, chainlen=2):
    '\n        Building the dictionary\n        '
    if ((chainlen > 10) or (chainlen < 1)):
        print('Chain length must be between 1 and 10, inclusive')
        sys.exit(0)
    self.mcd = Mdict()
    oldnames = []
    self.chainlen = chainlen
    for l in PLACES:
        l = l.strip()
        oldnames.append(l)
        s = ((' ' * chainlen) + l)
        for n in range(0, len(l)):
            self.mcd.add_key(s[n:(n + chainlen)], s[(n + chainlen)])
        self.mcd.add_key(s[len(l):(len(l) + chainlen)], '\n')
Building the dictionary
def __init__(self, chainlen=2):
    '\n        \n        '
    if ((chainlen > 10) or (chainlen < 1)):
        print('Chain length must be between 1 and 10, inclusive')
        sys.exit(0)
    self.mcd = Mdict()
    oldnames = []
    self.chainlen = chainlen
    for l in PLACES:
        l = l.strip()
        oldnames.append(l)
        s = ((' ' * chainlen) + l)
        for n in range(0, len(l)):
            self.mcd.add_key(s[n:(n + chainlen)], s[(n + chainlen)])
        self.mcd.add_key(s[len(l):(len(l) + chainlen)], '\n')