startswith() method in Python String Module
startswith method returns output as TRUE if the string starts with any prefix/value or else output will be FALSE.
Syntax:
str.startswith()Example-1:
text = "The Golconda is in Hyderabad city."
x = text.startswith("The")
print(x)
Output:
Example-2:
text = "Golconda is in Hyderabad city."
x = text.startswith("The")
print(x)
Output:
