Created
October 2, 2020 06:04
-
-
Save Allwin12/fb13ae55231507c893d9b460f08ee7fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from html import escape | |
html_string = ''' | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
</head> | |
<body> | |
<p>This is a sample string! </p> | |
</body> | |
</html> | |
''' | |
escaped_string = escape(html_string) | |
print(escaped_string) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment