def replaceBads(s):
 bads = [' ', '(', ')']
 x = s
 for bad in bads:
  x = x.replace(bad, '_')
 return x

def replaceBads ( s ) : bads = [ ' ' , '(' , ')' ] x = s for bad in bads : x = x . replace ( bad , '_' ) return x
replaces bad characters with good characters! .