xxxxxxxxxx
if link.lower().startswith(("js", "catalog", "script", "katalog")):
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
# str -> the prefix you are looking for
# beg -> where to start looking for the prefix
# end -> where to stop looking for the prefix
str.startswith(str, beg=0,end=len(string))