from tempfile import NamedTemporaryFile

def write_results(results):
    filename = NamedTemporaryFile(delete = False)
    print(filename.name)
    filename.write(bytes(results, "utf-8"))
    print("Dane zapisane w pliku", filename.name)

write_results("Tymczasowe dane")