1
The problem asks me to count the size of holes in the text Exp: A, D, R, O, P has only one hole, and B has two I made the following code:
qnt = int(input())
cont = 0
l = []
for i in range(qnt):
txt = input()
dic = {'A':1, 'D':1, 'O':1, 'P':1, 'R':1, 'B':2}
for i in txt:
if dic.get(i, 0):
cont += dic[i]
print(cont)
However, only appears the amount of holes of the last text, and I need each text.