Writing to file in python is as easy as reading to file as shown below
The code above is self explanatory. open method takes 2 arguments, first one is the file name and the second one is read-write mode. Here as we are writing to file we have used 'w'.
The code above is self explanatory. open method takes 2 arguments, first one is the file name and the second one is read-write mode. Here as we are writing to file we have used 'w'.
No comments :
Post a Comment