I tried the following code
s = "BANANA"
print(s.count('ANA'))
>> 1
The output was 1. It did not consider A which was previously counted. I want the output to be 2 since 'ANA' occurs twice. Ia their a function I don't know about.
I tried the following code
s = "BANANA"
print(s.count('ANA'))
>> 1
The output was 1. It did not consider A which was previously counted. I want the output to be 2 since 'ANA' occurs twice. Ia their a function I don't know about.