Created
July 17, 2020 08:21
-
-
Save CHARITH1995/0ea9ba48441e0931c66a94e577ab4008 to your computer and use it in GitHub Desktop.
save on .txt
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
with open("news.txt", "w", encoding="utf-8") as file: | |
file.write(date) | |
file.write(title.decode(encoding='UTF-8')) | |
file.write(contents.decode(encoding='UTF-8')) | |
file.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment