The ____ method returns the number of occurrences of a substring in the given string.
- count()
- find()
- index()
- search()
The count() method is used to find the number of occurrences of a substring in a given string. It returns an integer representing the count.
Loading...
Related Quiz
- What will be the result of the comparison 5 != 6 in Python?
- The true mechanism behind private attributes in Python is a feature called _______.
- How to create a single string without separators from a list of multiple strings?
- To loop through two lists simultaneously, one can use the _______ function in conjunction with a for loop.
- Which Python feature would you use to modify the behavior of a function or method?