Computer Science, asked by Hush50411, 6 hours ago

Write a function in Python that counts the number of alphabets M" and Y" present in a text file "STORY.TXT".3

Answers

Answered by kislaykumar33
1

Answer:

def displayMeMy():

num=0 f=open("story.txt","rt")

N=f.read()

M=N.split(

) for x in M:

if x=="Me" or x== "My":

print(x) num=num+1

f.close()

print("Count of Me/My in file:",num)

Similar questions