def kmerize_orf(orf, k, t):
    """
    Creates kmers of certain size and type from provided sequence.
    :param orf: nucleotide sequence
    :param k: size of a kmer
    :param t: type of a kmer, i.e. 'simple', 'all' or 'codon'
    :return kmers: list of kmers
    """

    kmers = []
    if t == 'simple':
        stop = len(orf) - (len(orf) % k)
        for i in range(0, stop, k):
            kmers.append(orf[i : i + k])
    elif t == 'all':
        for j in range(0, k):
            stop = len(orf) - ((len(orf) - j) % k)
            for i in range(j, stop, k):
                kmers.append(orf[i : i + k])
    elif t == 'codon':
        for j in range(0, k, 3):
            stop = len(orf) - ((len(orf) - j) % k)
            for i in range(j, stop, k):
                kmers.append(orf[i : i + k])

    return kmers