Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def count_of_a(list1):
- x = []
- for i in list1: #loop through the elements in list1
- if 'a' in i: #if a in any element in list1
- sage = i.count('a') #count the number of a in that element
- x.append(sage) #add the count to x
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement