String d'échappement pour html python

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