how to replace (or strip) an extension from a filename in python?,print(os.path.splitext('/home/user/somefile.txt')[0] + '.jpg')