What are the different file-processing modes with Python?

"Following are the file-processing modes that will help you-

  • read-only – ‘r’
  • write-only – ‘w’
  • read-write – ‘rw’
  • append – ‘a’

You can open a text file with the option ‘t’. So to open a text file to read it, you can use the mode ‘rt’. Similarly, for binary files, you can use ‘b’."

commented: Seems incomplete. Why not show how to research this? -3
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.