def save_object(obj, path): """saves an object to a file""" with open(path, 'wb') as output: pickle.dump(obj, output, pickle.HIGHEST_PROTOCOL)