call the function re.sub with 3 arguments: string "([a-z])'([A-Z])", lambda function with an argument m and return value,
t = re . sub ( "([a-z])'([A-Z])" , lambda m : m . group ( 0 ) . lower ( ) , value . title ( ) )