def _scrub_empty_str_values(dct, keys_to_scrub):
 for key in keys_to_scrub:
  if ((key in dct) and (dct[key] == '')):
   del dct[key]

def _scrub_empty_str_values ( dct , keys_to_scrub ) : for key in keys_to_scrub : if ( ( key in dct ) and ( dct [ key ] == '' ) ) : del dct [ key ]
remove any keys found in sequence keys_to_scrub from the dict if they have the value .