When opening a file, you'd say whether you want to read or write to a file. This is fine, but say for example later on in the program I change my mind and I want to write to a file instead of reading it. Yes, I could just say 'r+w' when opening the file, but what if I don't know if I'm going to do both? What if I have the user decide, and then later on I let the user change this.
Is it possible to do so without opening the file again and using the same file object? Thanks! -- https://mail.python.org/mailman/listinfo/python-list