Articles → Python → Write In Text File In Python

Write In Text File In Python






Example




myfile = open("test.txt","w")
myfile.write("This is the test message")
myfile.close()





Posted By  -  Karan Gupta
 
Posted On  -  Monday, March 4, 2019

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250