def iupac_converter(iupac_code):
    """
    Return a list of all possible bases corresponding to a given iupac
    nucleotide code.
    """
    iupac_dict = {"A": "A", "C": "C", "G": "G", "T": "T", "R": "AG", "Y": "CT",
                  "S": "GC", "W": "AT", "K": "GT", "M": "AC", "B": "CGT",
                  "D": "AGT", "H": "ACT", "V": "ACG", "N": "ACGT"}
    try:
        return list(iupac_dict[iupac_code.upper()])
    except KeyError:
        print(("Non-IUPAC nucleotide code {}. Code must be one of {}").format(
            iupac_code, "".join(list(iupac_dict.keys()))
            ))
        return []