Getting extension of a filename

 fn=str

ext=str
print("enter name before .")
fn=input()
print("enter name after .")
ext=input()
print(fn,end='.'+ext+" ")
print("is it correct")
if input()==("yes"):

print(ext)
here we got a code in python which gives the 
extension name as output of a filename.

Comments