I am going through Zed Shaw\'s Python Book. I am currently working on the opening and reading files chapters. I am wondering why we need to do a truncate, when we are alread
It's redundant since, as you noticed, opening in write mode will overwrite the file. More information at Input and Output section of Python documentation.