What's the difference? w and w+ | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

What's the difference? w and w+

What's the significance with w+ though. Examples, explanations please.. I know that w+ will read the file but wouldn't the file get truncated? And if reading will come first, what could be the senseā€” will the contents get saved or smthng, would the user be able to read the contents too or just the program ā€”it would still get truncated And anyway, is there a way to write on the file without it getting truncated? (not through append)

14th Jun 2022, 1:26 AM
bjakmz
bjakmz - avatar
1 Resposta
0
Maybe this has what you want https://docs.python.org/3/library/functions.html#open
14th Jun 2022, 4:50 AM
Ipang