“str.startswith(prefix[, start[, end]]) Return True if string starts with the prefix, otherwise return False. prefix can also be a tuple of prefixes to look for.”
I'm trying to avoid using so many comparisons and simply use a list, but not sure how to use it with str.startswith: if link.lower().startswith("js/") or link.lower().startswith("catalog/") or link...
“str.startswith(prefix[, start[, end]]) Return True if string starts with the prefix, otherwise return False. prefix can also be a tuple of prefixes to look for.”
plasma0713 のブックマーク 2018/07/13 22:28
このブックマークにはスターがありません。
最初のスターをつけてみよう!
str.startswith with a list of strings to test for
stackoverflow.com2018/07/13
I'm trying to avoid using so many comparisons and simply use a list, but not sure how to use it with str.startswith: if link.lower().startswith("js/") or link.lower().startswith("catalog/") or link...
2 人がブックマーク・2 件のコメント
\ コメントが サクサク読める アプリです /