Escaping strings for use in XML August 3, 2023 by Tarik Something like this? >>> from xml.sax.saxutils import escape >>> escape("< & >") '< & >'