Write the importance of passing file mode while declaring a file object in
data file handling.
Answers
Answered by
4
Answer:
A file object allows us to use, access and manipulate all the user accessible files. One can read and write any such files.
When a file operation fails for an I/O-related reason, the exception IOError is raised. This includes situations where the operation is not defined for some reason, like seek() on a tty device or writing a file opened for reading.
Similar questions