Answers for "python temporary files"

0

python temporary files

import tempfile

# Creates a file and returns a tuple containing both the handle and the path.
handle, path = tempfile.mkstemp()
with open(handle, "w") as f:
    f.write("Hello, World!");
Posted by: Guest on February-19-2022

Python Answers by Framework

Browse Popular Code Answers by Language