[Solved] UnsupportedOperation: not writable python
Opening the file without a mode defaults to opening it in readonly mode. If you want to write to it while reading, you’ve to specify the mode as r+. with open(r’G:\Programs\abc.txt’, mode=”r+”) as khand: … w+ will also open the file in r/w mode, however, it wipes the contents clean. You also use the a+ … Read more