xxxxxxxxxx
string = "Hello, World!"
# Using the 'startswith' method
if string.startswith("Hello"):
print("The string starts with 'Hello'")
else:
print("The string does not start with 'Hello'")
xxxxxxxxxx
text = 'hi, there'
if text.startswith('hi') == True:
print('True') # Output is True