Describe the count(str, beg=0,end= len(string))
Answers
Answered by
0
Explanation:
capitalize() – Capitalizes the first letter of string. count(str, beg= 0, end=len(string)) – Counts how many times str occurs in string or in a substring of string if beginning index 'beg' and ending index 'end' are given. ... min(str)- Returns the min alphabetical character from the string str.
plz mark my answer brainlist.
Answered by
1
The string count() method returns the number of occurrences of a substring in the given string.
Explanation:
Python count() method is a built-in function, searches the substring in the given string and returns how many times the substring is present in it. It has optional parameters 'start' and 'end' to define the starting and ending locations in the string.
- Syntax - str.count(sub, start= 0,end=len(string))
- Parameters -
- sub − This denotes the substring to be identified.
- start − Denotes the search start position. The first character is the 0th position. By default search starts from 0th position.
- end − Denotes the search end position. By default search ends at the last position.
- Return Value - Returns the number of occurrences of the substring in the given string.
Similar questions