Valid characters in a String
For DNA sequences of a small size (around a thousand characters), this is a practical implementation def is_valid_sequence (dna): # base case if len (dna) == 0: return True # check if first character is valid elif dna [0] not in [‘A’, ‘T’, ‘C’, ‘G’]: return False # otherwise, recurse on the rest of the … Read more