In which file mode can you read from and write to a file simultaneously?
- append-update mode
- read-append mode
- read-write mode
- read-write-append mode
You can read from and write to a file simultaneously in 'read-write-append mode' ('r+'). It allows both reading and writing operations on the file.
Loading...
Related Quiz
- Use the 'with' statement to open files, which will automatically close the file when it goes out of scope.
- The ____ method in TensorFlow or PyTorch is used to apply gradients to variables.
- What is the primary difference between the methods append() and extend() when applied to a list?
- How can you secure a RESTful API developed using Python?
- When you want to give a different name to a module upon importing, you use an _______.