def _flip_codons(codon_seq, target_seq):
 (a, b) = ('', '')
 for (char1, char2) in zip(codon_seq, target_seq):
  if (char1 == ' '):
   a += char1
   b += char2
  else:
   a += char2
   b += char1
 return (a, b)

def _flip_codons ( codon_seq , target_seq ) : ( a , b ) = ( '' , '' ) for ( char1 , char2 ) in zip ( codon_seq , target_seq ) : if ( char1 == ' ' ) : a += char1 b += char2 else : a += char2 b += char1 return ( a , b )
flips the codon characters from one seq to another .