def kmer_dictionary_counts(seq,k,dic={}):
    """Returns a dictionary of k,v = kmer:'count of kmer in seq'"""
    for i in range(0, len(seq)-k):
        subseq = seq[i:][:k]
        #if not dic.has_key(subseq): dic[subseq] = 1
        #else: dic[subseq] = dic[subseq] + 1
        #OR
        dic[subseq] = 1 + dic.get(subseq,0)
    return dic