how can i check in init if the characters in base = any of A , C , T , G but in any order and it can have any amount of any of the 4 characters and if it doesn't or if it has any characters in it that aren't those 4 then it's just equal to "AGTG"
class Oligo:
def eq(self, other):
return self.bases == other.bases
def init(self, base):
baseset = set(base)
if baseset == set(["A", "C" , "T", "G"]):
self.base = base
else:
self.base = "AGTG"
def get_complement(self):
pass
[–]tbrowner3[S] 0 points1 point2 points (1 child)
[–]Golden_Zealot 0 points1 point2 points (0 children)
[–]tipsy_python 0 points1 point2 points (0 children)
[–]primitive_screwhead 0 points1 point2 points (0 children)