It was a little hard to follow your logic of your sample code (writing,
reading and writing again), but
(1)The difference between r and r+.
- 'r+' opens the file for both reading and writing.
- 'r' should be used when the file will only be read.
I am not sure on how you want to store the co
"raghu" <[EMAIL PROTECTED]> writes:
> i want to know the difference between 'r' mode and 'r+' mode
> 1.i = open('c:\python25\integer.txt','w')>for writiing
> i.write('hai')->written some content in text file
> i = open('c:\python25\integer.txt','r')>for reading
> print i.
i want to know the difference between 'r' mode and 'r+' mode
1.i = open('c:\python25\integer.txt','w')>for writiing
i.write('hai')->written some content in text file
i = open('c:\python25\integer.txt','r')>for reading
print i.read()>for printing the contents in that te