[英]Code from python 2.7 to 3.5 (unicode)
I am really unfamiliar with python. 我真的不熟悉python。 I just have the code and wanted to upgrade the code to python 3.5.
我只有代码,想将代码升级到python 3.5。 I changed it and now there is one problem.
我更改了它,现在有一个问题。 I had the following code:
我有以下代码:
map(unicode.strip, set(list))
With Python 2.7 everyything works fine. 使用Python 2.7,一切正常。 But with Python 3.5 PyCharm cannot do anything with unicode.
但是使用Python 3.5时,PyCharm无法对Unicode执行任何操作。 So, how do I have to change the code so that Python 3.5 can work with it?
那么,如何更改代码以使Python 3.5可以使用它呢?
Thanks :) 谢谢 :)
您应该将unicode
更改为str
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.