<AptiCode/>

Question 485: What is the purpose of thewrite()method when used with a file object?

tcs
wipro
infosys
general
aptitude
reading-and-writing-files
python-programming

Thewrite()method is used to write data to a file in Python.