defDNA_strand(strand):'''
Returns the complementary strand of DNA for a given strand.
'''complementary_strand=""forsymbolinstrand:ifsymbol=='A':complementary_strand+='T'continueifsymbol=='T':complementary_strand+='A'continueifsymbol=='C':complementary_strand+='G'continueifsymbol=='G':complementary_strand+='C'continuereturncomplementary_strandprint(DNA_strand("ATTGC"))print(DNA_strand("GTTAAC"))
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
In Python: