0
Q:

escape string for html python

import html
s = '<p>&<\p>'
e = html.escape(s) # = '&lt;p&gt;&amp;&lt;\p&gt;'
0

New to Communities?

Join the community