+ 3
It is not a module, write() is a pre-defined method in python for writing to file objects. You first need to open the file in write mode, and then write something to it. Example: with open('file.txt', 'w') as f: f.write('Something') This will open a file named file.txt, write the word 'Something', and then close it.
29th Dec 2019, 8:33 AM
Aymane Boukrouh
Aymane Boukrouh - avatar