Closing a File:
After completing our operations on the file,it is highly recommended to close the file. For this we have to use close() function.
f.close()
Various properties of File Object:
Once we opened a file and we got file object, we can get various details related to that file by using its properties.\
name → Name of opened file
mode → Mode in which the file is opened
closed→ Returns boolean value indicates that file is closed or not
readable()→ Retruns boolean value indicates that whether file is readable or not
writable()→ Returns boolean value indicates that whether file is writable or not.
No comments:
Post a Comment
Thank you Very Much.For Given Comment