def calc_formation_energy(prod, react):
    """
    Calculate formation energy of 'A' in a.u. from 2 lists of energies.

    Formation energy = sum(product energy) - sum(reactant energy)

    Keyword arguments:
        prod (list) - list of product energies
        react (list) - list of reactant energies

    Returns:
        RFE (float) - Reaction formation energy in a.u.

    """
    RFE = sum(prod) - sum(react)
    return RFE