Explain Parameters of str.startswith(str, beg=0,end=len( string) )
Answers
Answered by
0
Parameters of method str.startswith(str, beg=0,end=len( string) )
Explanation:
Python string method startswith() tests if a string begins with str and optionally restricts matching start and end with the provided indices.
Syntax:
- str.startswith(str, beg=0,end=len(string));
Parameters:
- str − This is the string to be checked.
- beg − This is the optional parameter that sets the matching boundary start index.
- end − It is the optional parameter of the corresponding boundary to end start index.
Return Value:
- If matching string found then this method returns true otherwise false.
Similar questions