Ad
Code
Diff
  • def reverse_compliment(dna):
        DNA = dna.upper()
        rcom = []
        for i in dna:
            if i == 'A':
                rcom.append('T')
            elif i == 'T':
                rcom.append('A')
            elif i == 'G':
                rcom.append('C')
            elif i == 'C':
                rcom.append('G')
        r = rcom[::-1]
        reversedna = ''.join(r)
        return reversedna 
    • def reverse_compliment(dna):
    • pass
    • DNA = dna.upper()
    • rcom = []
    • for i in dna:
    • if i == 'A':
    • rcom.append('T')
    • elif i == 'T':
    • rcom.append('A')
    • elif i == 'G':
    • rcom.append('C')
    • elif i == 'C':
    • rcom.append('G')
    • r = rcom[::-1]
    • reversedna = ''.join(r)
    • return reversedna