import random


def interchanging_mutation(genome):
    """Performs Interchanging Mutation on the given genome. Two position
    are randomly chosen and they values corresponding to these positions
    are interchanged.

    Args:
        genome (required): The genome that is to be mutated.

    Returns:
        The mutated genome.
    """
    alleleA = random.randint(0, len(genome)-1)
    alleleB = random.randint(0, len(genome)-1)

    # Alleles should not be the same
    while alleleA == alleleB:
        alleleB = random.randint(0, len(genome)-1)

    temp_gene = genome[alleleA]
    genome[alleleA] = genome[alleleB]
    genome[alleleB] = temp_gene

    return genome