Return True if the string starts with the specified prefix, False otherwise. prefix A string or a tuple of strings to try. start Optional start position. Default: start of the string. end Optional stop position. Default: end of the string.
>>> 'Python'.startswith('Py') True >>> 'a tuple of prefixes'.startswith(('at', 'a')) True >>> 'Python is amazing'.startswith('is', 7) True
builtins/str.startswith
str.startswith