【发布时间】:2022-11-18 13:18:25
【问题描述】:
我的 html 内容为:
html = <div>new notes</div><div><ol><li>kssd</li></ol><ul><li>cds</li><li>dsdsk</li></ul><font color=\"#66717b\">ndsmnd</font></div>
当我将上面的表达式转换为字符串时,它会抛出错误
html_str = str(html)
我可以看到 " 已经在这里转义了。我需要用 //" 替换 /" 然后转换为字符串吗?
【问题讨论】:
标签: python html python-3.x python-2.7