Problem and Solutions
If statement depending on function results in python ?
By M.K. Verma · 3 May 2022

def validate (self):
if self.seqtype == "DNA" or self.seqtype == "RNA":
self.seqtype == self.seqtype
print ("The sequence is valid")
self.next_task() #added, as question says that should do this here
else:
print ("The sequence is invalid")
or add to list, which the question says more specifically, here in but could be in the next_task or some add_valid method.
def validate (self):
if self.seqtype == "DNA" or self.seqtype == "RNA":
self.seqtype == self.seqtype
print ("The sequence is valid")
valid_seqs.append(self) #the list must be inited somewhere
else:
print ("The sequence is invalid")