def _check_bases(seq_string):
 seq_string = ''.join(seq_string.split()).upper()
 for c in '0123456789':
  seq_string = seq_string.replace(c, '')
 if (not set(seq_string).issubset(set('ABCDGHKMNRSTVWY'))):
  raise TypeError(('Invalid character found in %s' % repr(seq_string)))
 return (' ' + seq_string)

def _check_bases ( seq_string ) : seq_string = '' . join ( seq_string . split ( ) ) . upper ( ) for c in '0123456789' : seq_string = seq_string . replace ( c , '' ) if ( not set ( seq_string ) . issubset ( set ( 'ABCDGHKMNRSTVWY' ) ) ) : raise TypeError ( ( 'Invalid character found in %s' % repr ( seq_string ) ) ) return ( ' ' + seq_string )
check characters in a string .