Vidyalelo
Python · Q18

Files Handling in Python

Programming · Python · question 18

Q18

What is the output of the following code:file = open('data.txt', 'r')content = file.read()print(content)

A.
Contents of data.txt
B.
An error will occur
Answer
C.
file object
D.
r

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board