Report Bug

Qus

What is the output of following?

f = open("data.txt", "r")
print(f.readline())
Qus

निम्न code का output क्या होगा?

f = open("data.txt", "r")
print(f.readline())


A. One line from the file
B. Entire file
C. List of lines
D. Error


Solution
A. One line from the file



Explanation
readline() reads one line at a time. <br><br> readline() file से एक बार में एक line पढ़ता है।
Latest Current Affairs 2026 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad