So by adding encoding='utf-8' as a parameter to the open function, the file reading and writing is all done as utf8 (which is also now the ... ... <看更多>
To open a file, you can use Python's built-in open() function. ... Why do we need to include encoding='utf-8' to open our text file? Well, UTF-8 is a ... ... <看更多>
That's expected behaviour - you are editing your script in a temporary file, and that line is the Python console loading and running your ... ... <看更多>