Return True if the bases represented by the str parameters form a base pair and False otherwise. Each str is a single character: one of 'A', 'T', 'C', and 'G'.

is_b_pair(letter,DNA):
new_letter =""
new_DNA += new_letter

if new_DNA in [GAATTC,AAGCTT]:
return True

else:
return False

please help

I'm assuming that there is some background information that a non-biologist should know before staing with the script. Is a "base pair" an AT, TA, GC, or CG? Are you to search the input strings "GAATTC", "AAGCTT" for the occurance of one of the base pairs?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.