Are 'r+' and 'w+' same? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Are 'r+' and 'w+' same?

'r+' is used to read and write; 'w+' is also used to read and write. Is there any difference between them? Or, they are same in operation.

8th Feb 2019, 12:27 PM
Md. Tahmid Hasan
Md. Tahmid Hasan - avatar
1 Answer
+ 8
w+ creates the file if it doesn't exist.
8th Feb 2019, 12:51 PM
Anna
Anna - avatar