filename = input("Input the Filename: ")
f_extns = filename.split(".")
print ("The extension of the file is : " + repr(f_extns[-1]))
Output:
Input the Filename: abc.java
The extension of the file is : 'java'
filename = input("Input the Filename: ")
f_extns = filename.split(".")
print ("The extension of the file is : " + repr(f_extns[-1]))
Output:
Input the Filename: abc.java
The extension of the file is : 'java'
Write a program to add two numbers in python
Python program for implementation of Quicksort Sort
Python program for Armstrong number
write() and read() in file handling in python
program to display the examination schedule
Python program for implementation of Bubble Sort
How to add all number in list in python
Python program to print the calendar of a given month and year
Write Hello World Program in Python
Python program to find the largest of three numbers
Python program to accept a filename from the user and print the extension of that
Write a Python program to get a string which is n (non-negative integer) copies of a given str