I am new to python and learning. As given here count()
method when used on strings gives the number of occurrences of sub string in a string.
So when i Do :
'BANANA'.count('ANA')
Expected output should be 2 as 'ANA' occurs twice in 'BANANA' but count
returns 1.
Can someone please explain this, or maybe i have misunderstood something.
Please point me in the right direction.