human
check if file ends with any allowed extension.
assistant
Here is a Python function to check if a file ends with any allowed extension

import re

def is_file_allowed_extension(file_name: str, extensions: list) -> bool:
    """
    Check if file ends with any allowed extension

    :type file_name: str
    :param file_name: The name of the file to check

    :type extensions: list
    :param extensions: The list of allowed extensions
    """

    for extension in extensions:
        if file_name.endswith(extension):
            return True
    return False

# Enter the file name
file_name = "test.txt"

# Enter the list of allowed extensions
extensions = ["txt", "txt", "txt"]

# Calling the function
print((is_file_allowed_extension(file_name, extensions)))

#Example Output
# True

#Remember to inspect code for bugs.