Sign up for Free !!
World's first open source developer community with
Ticketing System
Could you please tell me a way in python to open a file for both reading and writing......
Thanks in advance...
f= open("sample.txt","w+")
Here, we used "w" letter in our argument, which indicates write and will create a file if it does not exist in library
Plus sign indicates both read and write.
Please Login/Register to write your answer !!!
Here, we used "w" letter in our argument, which indicates write and will create a file if it does not exist in library
Plus sign indicates both read and write.