I have a string
string = 'AAA'
When using the string.count('A') the output is equal to 3
and if it is string.count('AA') the output is equal to 1
However, there are 2 'AA's in the string.
Is there any method to count repeated string like above by using dictionary function?
I'd like to hear your helpful suggestions.
Thank you all in advance.
 
     
     
     
     
     
    