Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- f = open('24.txt')
- l = [line.strip() for line in f]
- gcnt=0
- for i in range(len(l)):
- s = l[i]
- cntA =0
- cntE=0
- for j in range(len(s)):
- if s[j]=='A':
- cntA+=1
- elif s[j]=='E':
- cntE+=1
- if cntA>cntE:
- gcnt+=1
- print(gcnt)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement