设为首页 加入收藏

TOP

NameError: name 'unicode' is not defined
2019-04-15 02:35:29 】 浏览:37
Tags:NameError: name ' unicode' not defined

There is no such name in Python 3, no. You are trying to run Python 2 code in Python 3. In Python 3, unicode has been renamed to str.

简单来说就是: Python2 的unicode 函数在 Python3 中被命名为 str。在 Python3 中使用 ·str 来代替 Python2 中的 unicode.

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇Python 解决 :NameError: name &.. 下一篇Python中sys.path.append和os.env..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目