human
how to get stem of filename.
assistant
Here is a Python code to get the filename of the file

import os

def get_stem(filename):
    """
    Get the stem of a filename.
    """
    return os.path.basename(filename).split('.')[0]

# Enter the filename
filename = "test.txt"

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

#Example Output
# test

#Remember to inspect code for bugs.