CBSE Class 12 Computer Science
Question 33 of 44
Solved 2025 Sample Question Paper CBSE Class 12 Computer Science (083) — Question 1
Back to all questionsSuppose the file "Emails.txt" contains the following text:
jagan@cmail.com
aliya@gmail.com
ali@cmail.net
sara@cmail.edu
mahi@yahoo.com.
def display_words():
file = open("Emails.txt", 'r')
content = file.read()
words = content.split()
for word in words:
if '@cmail' in word:
print(word, end = ' ')
file.close()
display_words()jagan@cmail.com ali@cmail.net sara@cmail.edu