def calc_dinucleotide_counts(sequence):
 total = 0
 for letter in 'ACTGUactgu':
  total += sequence.count((letter + letter))
 return total

def calc_dinucleotide_counts ( sequence ) : total = 0 for letter in 'ACTGUactgu' : total += sequence . count ( ( letter + letter ) ) return total
returns the total count of di-nucleotides repeats .