How to Write a text.txt file in Python