Function Details: startswith

Description


Returns True if string starts with the specified prefix, False otherwise.


Extended Description


The startswith() method checks if the string starts with the specified prefix. If start is provided, the check begins at that position. If end is provided, the check stops at that position. The prefix can be a tuple of strings to check for any of multiple prefixes.


Read More about startswith from Python Documentation

Function Signature



Module: builtins

Class: str

Parameters



Parameter List


  • prefix: Union[str, Tuple[str]]
  • start: int
  • end: int

Return



Return Type


bool

Output

Explanation