Write a Python program to accept a filename from the user and print the extension of that


Topic: Write a Python program to accept a filename from the user and print the extension of that

Solution

def filename_extension(file):
    f_extns = file.split(".")
    return f"The extension of the file is :{repr(f_extns[-1])}"



List all Python Programs