I have written a small program in python to count the number of occurrences of a character in python.
def count_star():
fo=open("e:/txt/inpt.txt","r")
str=fo.read()
index=0
ca=0
cb=0
cc=0
for letter in str:
if letter == 'a' or 'A':
ca=ca+1
elif letter == 'b' or 'B':
cb=cb+1
elif letter == 'c' or 'C':
cc=cc+1
print(ca)
print(cb)
print(cc)
Output: 6 0 0 Input file: bcaaac
the problem is that it should print 3 1 2 but it is not doing so, please suggest