code: def kmer_count(seq_list, k):
      
      # generate all k-mers
      all_kmers = generate_all_kmers(k)
      kmer_count_list = []
      for seq in seq_list:
          kmer_count_list.append([seq.count(kmer) for kmer in all_kmers])
      return pd.DataFrame(kmer_count_list, columns=all_kmers)
docs: Generate k-mer counts from a set of sequences
  
      Args:
          seq_list (iterable): List of DNA sequences (with letters from {A, C, G, T})
          k (int): K in k-mer.
      Returns:
          pandas.DataFrame: Count matrix for seach sequence in seq_list
  
      Example:
      >>> kmer_count(["ACGTTAT", "GACGCGA"], 2)
         AA  AC  AG  AT  CA  CC  CG  CT  GA  GC  GG  GT  TA  TC  TG  TT
      0   0   1   0   1   0   0   1   0   0   0   0   1   1   0   0   1
      1   0   1   0   0   0   0   2   0   2   1   0   0   0   0   0   0