Write a program to create a text file and count the number of ‘a’ and ‘m’ characters present in the file.
Answers
Answered by
0
Explanation:
f=open('file location' ,'r')
count=0
for i in f:
if i=='a' or i=='m':
count=count+1
else:
continue
print(count)
f.close()
Similar questions