def random_lower(t):
 return ''.join(((c.lower() if (random.random() > 0.5) else c) for c in t))

def random_lower ( t ) : return '' . join ( ( ( c . lower ( ) if ( random . random ( ) > 0.5 ) else c ) for c in t ) )
change random chars of the string to lower case .