python

[Python] Save (write) data to file

myfile = open('hello.txt', 'w')
myfile.write('Hello world')
myfile.close()
Output
hello.txt:

Hello world


Was this helpful?