Skip to content

Instantly share code, notes, and snippets.

@justxor
Created June 3, 2022 09:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justxor/da3a4176516490e3d7b23ac1286149de to your computer and use it in GitHub Desktop.
Save justxor/da3a4176516490e3d7b23ac1286149de to your computer and use it in GitHub Desktop.
# import html
import html
s = '<html><head></head><body><h1>GeeksForGeeks</h1></body></html>'
# Using html.escape() method
gfg = html.escape(s)
print(gfg)
#Вывод:
#<html><head></head><body><h1>GeeksForGeeks</h1></body></html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment