Create a serverless function in Python that converts a filename to a corresponding filetype.
filename: “example.jpg”
import os

def get_filetype(filename):
 _, file_extension = os.path.splitext(filename)
 return(file_extension.lower()[1:])

filetype = get_filetype("example.jpg")
print(filetype)

# Output: jpg