What do you want to save?
Add Code snippet
New code examples
-
Python 2021-11-12 15:38:09
python string starts with any char of list
# `str.startswith` supports checking for multiple prefixes: >>> "abcde".startswith(("xyz", "abc")) True # You must use a tuple though, so convert your lists using tuple() >>> prefixes = ["xyz", &qu... Add solution