def prep_case_insensitive(value):
 value = re.sub('\\s+', ' ', value.strip().lower())
 return value

def prep_case_insensitive ( value ) : value = re . sub ( '\\s+' , ' ' , value . strip ( ) . lower ( ) ) return value
prepare a string for case-insensitive comparison .