Difference between modes a, a+, w, w+, and r+ in built-in open function?

后端 未结 6 1591
梦毁少年i
梦毁少年i 2020-11-21 05:43

In the python built-in open function, what is the exact difference between the modes w, a, w+, a+, and r+?

6条回答
  •  无人共我
    2020-11-21 06:30

    I noticed that every now and then I need to Google fopen all over again, just to build a mental image of what the primary differences between the modes are. So, I thought a diagram will be faster to read next time. Maybe someone else will find that helpful too.

提交回复
热议问题