2015-11-18から1日間の記事一覧
Pythonの正規表現を使えば簡単に調べることができます。 re.searchの第三引数にre.IGNORECASEを指定してあげればOK。 import re word = 'Python' description = 'pythonが恋しい' if re.search(word, description, re.IGNORECASE): # 実行したい処理 PYthon…
Pythonの正規表現を使えば簡単に調べることができます。 re.searchの第三引数にre.IGNORECASEを指定してあげればOK。 import re word = 'Python' description = 'pythonが恋しい' if re.search(word, description, re.IGNORECASE): # 実行したい処理 PYthon…