CBSE Class 12 Computer Science
Question 34 of 44
Solved 2025 Sample Question Paper CBSE Class 12 Computer Science (083) — Question 2
Back to all questionsSuppose the file "Words.txt" contains the following text:
The quick brown fox jumps over the lazy dog and runs swiftly through the forest
def display():
file = open("Words.txt", 'r')
content = file.read()
words = content.split()
for word in words:
if len(word) > 5:
print(word, end = ' ')
file.close()
display()swiftly through forest