import re


def het(genotype):
    """
    Determine whether a genotype in format A|G is het.
    :param genotype: genotype, str.
    :return: bool, True = het, False = hom.
    """
    if ':' in genotype:
        genotype = genotype.split(':')[0]
    hap1, hap2 = re.split("/|\|", genotype)
    return hap1 != hap2