Writing the Data to the File
Writing the Data to the File
1. write()
2. writelines()
-----------------------------------------------------------------------------------
------------------------------------------------------------
1. write()
-----------------------------------------------------------------------------------
------------------------------------------------------------
=>Syntax: varname=filepointerobj.write(strdata)
=>This Function is used for writing any type of data to the file in the form of
str.
-----------------------------------------------------------------------------------
------------------------------------------------------------
2. writelines()
-----------------------------------------------------------------------------------
------------------------------------------------------------
=>Syntax: varname=filepointerobj.writelines(Iterable-object)
=>This Function is used for writing any type of Iterable object data to the file in
the form of str.
-----------------------------------------------------------------------------------
------------------------------------------------------------
NOTE: Here write() and writelines() will write any type of data to the file in the
form of Value by Value.