def _generate_immediate_neighbours(pattern: str) -> list:
    '\n    Generate immediate (different by one mismatch) neighbours of the given genome pattern\n    :param pattern: a pattern to examine\n    :return: neighbourhood, NOT including the given pattern\n    '
    generated = []
    for i in range(len(pattern)):
        if (pattern[i] == 'A'):
            generated.extend([((pattern[:i] + c) + pattern[(i + 1):]) for c in LIST_A])
        elif (pattern[i] == 'C'):
            generated.extend([((pattern[:i] + c) + pattern[(i + 1):]) for c in LIST_C])
        elif (pattern[i] == 'T'):
            generated.extend([((pattern[:i] + c) + pattern[(i + 1):]) for c in LIST_T])
        elif (pattern[i] == 'G'):
            generated.extend([((pattern[:i] + c) + pattern[(i + 1):]) for c in LIST_G])
    return generated
Generate immediate (different by one mismatch) neighbours of the given genome pattern
:param pattern: a pattern to examine
:return: neighbourhood, NOT including the given pattern
def _generate_immediate_neighbours(pattern: str) -> list:
    '\n    Generate immediate (different by one mismatch) neighbours of the given genome pattern\n    :param pattern: a pattern to examine\n    :return: neighbourhood, NOT including the given pattern\n    '
    generated = []
    for i in range(len(pattern)):
        if (pattern[i] == 'A'):
            generated.extend([((pattern[:i] + c) + pattern[(i + 1):]) for c in LIST_A])
        elif (pattern[i] == 'C'):
            generated.extend([((pattern[:i] + c) + pattern[(i + 1):]) for c in LIST_C])
        elif (pattern[i] == 'T'):
            generated.extend([((pattern[:i] + c) + pattern[(i + 1):]) for c in LIST_T])
        elif (pattern[i] == 'G'):
            generated.extend([((pattern[:i] + c) + pattern[(i + 1):]) for c in LIST_G])
    return generated