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