def parse_communication(communication): email = parsers.email(communication)[1] phone_number = parsers.phonenumber(communication)[1] postcode = parsers.postcode(communication)[1] dob = parsers.date(communication)[1] return locals()
def parse_communication(communication, display = False): index = 0 if display else 1 email = parsers.email(communication)[index] phone_number = parsers.phonenumber(communication)[index] postcode = parsers.postcode(communication)[index] dob = parsers.date(communication)[index] return locals()