def luhn_checker(credit_input):
    """This function checks that the card number is valid according to the luhn algorithm."""
    luhn_list_original = list(str(credit_input))
    luhn_list_original = [int(i) for i in luhn_list_original]
    check_number = luhn_list_original.pop()  # the last number is removed and allocated in check_number
    luhn_list = [i * 2 if index % 2 == 0 else i for index, i in enumerate(reversed(luhn_list_original))]
    luhn_list = [i - 9 if i > 9 else i for i in luhn_list]
    if (sum(luhn_list) + check_number) % 10 != 0:
        return False
    else:
        return True