Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #sample text
- text = "Hi this is a sample text."
- #write the text string into a text file
- with("filename.txt",'w') as open_file:
- open_file.write(text)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement