简体   繁体   中英

Code from python 2.7 to 3.5 (unicode)

I am really unfamiliar with python. I just have the code and wanted to upgrade the code to 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. But with Python 3.5 PyCharm cannot do anything with unicode. So, how do I have to change the code so that Python 3.5 can work with it?

Thanks :)

您应该将unicode更改为str

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM