Automate Cybersecurity Tasks with Python | Weekly challenge 4 Quiz |
What does the following code do?
with open("logs.txt", "r") as file:
- It copies a file called “logs.txt” into a new file “r”.
- It opens a file called “logs.txt” in write mode and stores it in a variable called file.
- It copies a file called “r” into a new file “logs.txt”.
- It opens a file called “logs.txt” in read mode and stores it in a variable called file.