My code is
def is_base_pair(str1, str2):
if lens(str1) == 1 and lens(str2) == 1:
if (str1 == "A" and str2 == "T") or (str1 == "G" and str2 == "C") or (str1 == "T" and str2 == "A") or (str1 == "C" and str2 == "G"):
return True
else:
return False
else:
return False
What I want is to have both str1 and str2 to contain either one of these strings
"A" "T" "G" "C"
And combination of "A" "T" or "T" "A" and "C" "G" or "G" "C" with return True
And anything else will return False.
Anyone can help me here?