human
3 file get extension.
assistant
Here is a Python code to 3 file get extension

import os

def get_extension(filename):
    """Returns the extension of a file."""
    return os.path.splitext(filename)[1]

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

# Calling the function
print((get_extension(file_name)))

#Example Output
# .txt

#Remember to inspect code for bugs.