CBSE Class 12 Computer Science
Question 32 of 42
Solved 2024 Sample Question Paper CBSE Class 12 Computer Science (083) — Question 3
Back to all questionsThe Alpha.txt file includes following data :
You To be or not to be, that is the question.
You The quick brown fox jumps over the lazy dog.
To infinity and beyond!
def test():
fobj1 = open("Alpha.txt", "r")
data = fobj1.readlines()
for line in data:
L = line.split()
if L[0] == "You":
print(line)
fobj1.close()
test()You To be or not to be, that is the question.
You The quick brown fox jumps over the lazy dog.