MCQ Answer

Which of the following options can be used to read the first line of a text file data.txt?

Which of the following options can be used to read the first line of a text file data.txt?

टेक्स्ट फाइल data.txt की पहली लाइन को पढ़ने के लिए निम्न में से कौन सा विकल्प इस्तेमाल किया जा सकता है?
Topic : File Processing in Python

A. f = open('data.txt'); f.read()

B. f = open('data.txt','r'); f.read(n)

C. myfile = open('data.txt'); f.readline()

D. f= open('data.txt'); f.readlines()




Correct Answer is :

C. myfile = open('data.txt'); f.readline()



Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Best Website and Software Company in Allahabad