programming-examples/python/_Basics/Input a filename and print the extension of that.py
2019-11-15 12:59:38 +01:00

3 lines
135 B
Python

filename = input("Input the Filename: ")
f_extns = filename.split(".")
print ("The extension of the file is : " + repr(f_extns[-1]))