human
determine if string is file with file extension.
assistant
Here is a Python function to determine if string is a file with file extension

import os

def is_file_with_extension(filename):
    """
    Determine if string is file with file extension.
    """
    return filename.endswith('.txt')

# Enter the filename
filename = 'test.txt'

# Calling the function
print((is_file_with_extension(filename)))

#Example Output
# True

#Remember to inspect code for bugs.