You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
-
But this does not work on Python 2, right? (I should said, on this Python 3 code, it looks so concise and reasonable)Liwen Zhao– Liwen Zhao2017年10月15日 19:35:33 +00:00Commented Oct 15, 2017 at 19:35
-
1it should not work on Python 2. We stay on Python 3. 3 is so much better.david m lee– david m lee2017年10月16日 04:31:01 +00:00Commented Oct 16, 2017 at 4:31
-
2This is THE answer. This is how you properly write utf-8 to a file, thanks!Kerwin Sneijders– Kerwin Sneijders2020年12月09日 11:45:03 +00:00Commented Dec 9, 2020 at 11:45
-
@KerwinSneijders the question is about Python 2.7, not Python 3Csaba Toth– Csaba Toth2021年11月02日 20:03:59 +00:00Commented Nov 2, 2021 at 20:03
-
1Python 2.x is no longer supported, more and more people will never use python 2 anymore and will find this question on SO when searching for a python 3 solution. And I don't think there should be 2 questions both for python 2 and 3, so because python 2.x is no longer supported, this should be the new accepted answerKerwin Sneijders– Kerwin Sneijders2021年11月02日 21:06:11 +00:00Commented Nov 2, 2021 at 21:06
lang-py