File manipulations play a important role in any kind of
programming. In PyS60 also we have some special and easy methods by which we
can read from a file and write into a file.
1.How to read from a
file.
f
= open("c://file_read.txt","rb")# this will open the file in read mode
specified by rb
f.read() # will read the file
2. How to write in a file.
f
= open("c://file_writ.txt","w")# this will open the file in write mode
specified by w if we want a append something we can open in
append mode i.e."a".