I was coding in python to find the number of times a single sub string comes in a given string I used the predefined method of Python3 ie .count()
1The thing is here when I am trying to count the number of time 'B' or 'A' or'NA' occurs it gives me the perfect result but when I am counting number of 'ANA' present it should give me 2 but gives the output as 1
s="BANANA"
print("B = ",s.count('B'))
print("NA = ",s.count('NA'))
print("NAN = ",s.count('NAN'))
#Here the mistake occurs
print("ANA = ",s.count('ANA'))