Question: what is the difference between r+ and w+ in python?
Answer: r+ : Opens a file for reading and writing, placing the pointer at the beginning of the file. ... It will create a new file if one with the same name doesn't exist. wb : Opens a write-only file in binary mode. w+ : Opens a file for writing and reading.