Why not use the read function when using the w + and a + mode when opening a file in Python? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Why not use the read function when using the w + and a + mode when opening a file in Python?

?

19th Nov 2020, 10:01 AM
michael bijirie
michael bijirie - avatar
2 Respostas
+ 2
Here default r mode existing
19th Nov 2020, 10:38 AM
SĆ¢Ć±tĆ“sh
SĆ¢Ć±tĆ“sh - avatar
+ 1
Because in a+ and w+ modes are reading the files from the end, while in r and r+ you are reading the files from the start. I don't know why a+ and w+ modes even exist.
19th Nov 2020, 11:00 AM
Seb TheS
Seb TheS - avatar