import pickle def output (data, destination): with open(destination, "w") as out_file: pickle.dump(data, out_file)