def trim_alignment(alignment, cutoff):
    """
    Trim the alignment based on the number of informative residues

    :param alignment: The list of alignment strings
    :type alignment: list of str
    :param cutoff: The cutoff for informative residues
    :type cutoff: float
    :return: The revised list of alignments
    :rtype: list of str
    """

    alignmentlen = len(alignment[0])
    naligns = len(alignment)

    keepposn = []
    for i in range(alignmentlen):
        non_ir = 0 # non informative residues (i.e. '-')
        for a in alignment:
            if a[i] == '-':
                non_ir += 1
        if (1.0 * (naligns - non_ir) / naligns) >= cutoff:
            keepposn.append(i)


    newalignment = []
    for a in alignment:
        newalignment.append(''.join([a[i] for i in keepposn]))
    return newalignment