how to use open() code example
Example: how to use with open
with open('output.txt', 'w') as file: # Use file to refer to the file object
file.write('Hi there!')
# more down here
# https://www.pythonforbeginners.com/files/with-statement-in-python