alexa
Facebook
Twitter
LinkedIn
Instagram
Whatsapp
Call Now
Quick Inquiry

If statement depending on function results in python ?

If statement depending on function results in python ?
 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")

61 0
7

Write a Comments


* Be the first to Make Comment

GoodFirms Badge
GoodFirms Badge

Fix Your Meeting With Our SEO Consultants in India To Grow Your Business Online