Examveda
Examveda

How do you open a file named data.txt in read mode in Python?

A. file = open('data.txt', 'r')

B. file = open('data.txt', 'read')

C. file = open('data.txt', 'read mode')

D. file = open('data.txt')

Answer: Option A


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

Join The Discussion

Related Questions on Files Handling in Python