Write a function called parseExtension that takes a file name as a string parameter and returns the file extension. Example: If your function was passed “python.exe” as a string parameter it would return “exe”.
I want it to take userinput and seperate the files from the extension starting at the period. I have tried so many different things I'm lost.
def parseExtension(filename): if filename.strip('any')[-3:]: filename.split('.') print filename[-3:] filename = raw_input('Please Enter a File Name: ')