James Kingston Clarke

TIL In python you can pass a tuple to `str.startswith`

Python’s str.startswith can take a tuple as an argument, and will return True if any element matches.

txt = "Hi, welcome to my world."

x = txt.startswith(("Hello", "Hi"))

print(x) # True

References