Welcome to Python- Question2Answer, where you can ask questions and receive answers from other members of the community.

Explain all the file processing modes supported by Python ?

0 votes

Explain all the file processing modes supported by Python ?

asked Jun 5 in Python by anonymous

1 Answer

0 votes

Python allows you to open files in one of the three modes. They are:
read-only mode, write-only mode, read-write mode, and append mode by specifying the flags “r”, “w”, “rw”, “a” respectively.
A text file can be opened in any one of the above said modes by specifying the option “t” along with
“r”, “w”, “rw”, and “a”, so that the preceding modes become “rt”, “wt”, “rwt”, and “at”.A binary file can be opened in any one of the above said modes by specifying the option “b” along with “r”, “w”, “rw”, and “a” so that the preceding modes become “rb”, “wb”, “rwb”, “ab”.

answered Jun 5 by anonymous

Related questions

0 votes
1 answer
1 view asked Apr 15 in Python by anonymous
0 votes
1 answer
1 view asked Apr 15 in Python by anonymous
0 votes
1 answer
...