Q. Which method counts occurrences of a substring?
Solution:
count() returns the number of occurrences, e.g., ‘aaa’.count(‘a’) = 3.
Get Question Bank
Strengthen Your Practice with our comprehensive question bank.
count() returns the number of occurrences, e.g., ‘aaa’.count(‘a’) = 3.
Strengthen Your Practice with our comprehensive question bank.