Tuesday, March 15, 2016

Writing to file in python

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'.
5 Python: Writing to file in python 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 argument...

No comments :

Post a Comment