Advertisement
Guest User

Untitled

a guest
Mar 24th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.15 KB | None | 0 0
  1. #sample text
  2. text = "Hi this is a sample text."
  3.  
  4. #write the text string into a text file
  5. with("filename.txt",'w') as open_file:
  6. open_file.write(text)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement