map_func = {'ID': lambda x: 'mig_farm_seq.nextval', 'ENTERPRISE_NAME':
    wrap_str, 'TAX_NUMBER': wrap_str, 'FAMILY_NAME': lambda x: wrap_str(x.
    split()[0]), 'GIVEN_NAME': lambda x: wrap_str(x.split()[1]),
    'ENTERPRISE_REGISTRATION_NUMBER': wrap_str, 'PREMISE_NAME': wrap_str,
    'HOUSE_ID': wrap_str, 'POSTAL_CODE': wrap_str, 'PHONE_NUMBER_1': lambda
    x: wrap_str(get_phone_number(x, True)), 'PHONE_NUMBER_2': lambda x:
    wrap_str(get_phone_number(x, False)), 'FAX_NUMBER': lambda x: wrap_str(
    x.replace(' ', '')), 'BANK_IDENTIFIER': lambda x: wrap_str(x.replace(
    ' ', '').replace('-', '')[:3]), 'BANK_ACCOUNT_NUMBER': lambda x:
    wrap_str(x.replace(' ', '').replace('-', '')), 'NUMBER_OF_EMPLOYEES':
    wrap_null, 'SETTLEMENT_NUMBER': wrap_null, 'REGISTRATION_NUMBER': lambda
    x: insert_reg_number % x, 'GENDER': wrap_str, 'ACTIVITY': lambda x: '0',
    'REG_HOLDER_ACTIVITY': lambda x: '0', 'PROCESSED_BY_JOB': lambda x: '0'}
Example where lambdas are very useful in Python