Examveda

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

C. file object

D. r

Answer: Option B


This Question Belongs to Python Program >> Files Handling In Python

Join The Discussion

Related Questions on Files Handling in Python