设为首页 加入收藏

TOP

NameError: name 'unicode' is not defined
2018-12-16 18:43:00 】 浏览:39
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基础语法总结(六)-- pyth.. 下一篇Python进阶 一   安装Python..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目