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 पढ़ता है।



Report Bug