def extract_phone_number(num, replacement):
    """Takes in the phone number as string and replace_with arg as replacement, returns processed phone num or None"""
    phone_num = "".join(i for i in num if i.isdigit())
    if len(phone_num) != 10:
        phone_num = replacement if replacement == "--blank--" else num
    return phone_num