python - github: An input and output program code. I just changed the data in the tsv file. Why can't it be output and a UnicodeDecodeError occurs?
滿天的星座
滿天的星座 2017-06-15 09:21:21
0
3
844

I copied a complete input and output code program that could be run, and then I modified the data of the tsv file. The original data was as follows and I modified it to the picture below. Then it cannot run and the following error occurs
How to correct this situation? ? ?

滿天的星座
滿天的星座

reply all(3)
小葫芦

Reminds me of the previous post on Zhihu "What are the "black spots" in each programming language", which contains an answer about Python
https://zhihu.com/question/53..., how can I save you? , the method is also very simple, you need to read "Why is Python coding so painful?" 》The most upvoted answer.

扔个三星炸死你

This is a problem with Chinese encoding. You can solve this type of problem if you understand the connection between the decode, encode, and unicode methods. This kind of problem is often encountered, so you need to learn how to fish.

扔个三星炸死你

Let’s try it with python3 first!

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!