Discuss / Python / L.append(encode('some & data'))出错是什么问题?

L.append(encode('some & data'))出错是什么问题?

Topic source

gd83594394

#1 Created at ... [Delete] [Delete and Lock User]
L.append(encode('some & data'))
上面这个说
Traceback (most recent call last):
  File "<pyshell#21>", line 1, in <module>
    L.append(encode('some & data'))
NameError: name 'encode' is not defined
**请教是什么问题?**

以下FOR跟我一样需要额外补充背景知识的小白

XML 简介 http://www.w3school.com.cn/xml/xml_intro.asp

为什么都反对 XML 而支持使用 JSON? - 知乎 https://www.zhihu.com/question/25636060

XML DOM 节点 http://www.w3school.com.cn/xmldom/dom_nodes.asp

SAX解析_百度百科 https://baike.baidu.com/item/SAX%E8%A7%A3%E6%9E%90/10406120

YSkingJ

#2 Created at ... [Delete] [Delete and Lock User]

再加上“python中的expat库”的知识,本节内容就不难理解了。 https://www.cnblogs.com/jogger/archive/2012/11/08/2760414.html


  • 1

Reply