s = "ANANAS"
print(s.count("ANA"))
print(s.count("AN"))
print(s.count("A"))
"ANA" occurs two times in "ANANAS" but python prints 1 whereas "AN" occurs two times and python prints 2. "A" occurs three times and python prints 3 as output. Why is this strange behaviour?