def all_bases_valid(seq):
 valid_bases = ['a', 'A', 'c', 'C', 'g', 'G', 't', 'T', 'N']
 for base in seq:
  if (base not in valid_bases):
   return False
 return True

def all_bases_valid ( seq ) : valid_bases = [ 'a' , 'A' , 'c' , 'C' , 'g' , 'G' , 't' , 'T' , 'N' ] for base in seq : if ( base not in valid_bases ) : return False return True
confirm that the sequence contains only bases .