0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

文字列に関すること(調べたこと):Python

Posted at

※このQiitaで記事を書くことに慣れていない為、誤字・脱字や読みづらい部分もあるかと思いますが、ご理解ください。

閲覧いただき、ありがとうございます!
私は、現在医療業界で働く医療従事者になります。
とある経緯からpythonを勉強中です。
ここでは自分が勉強した事を復習したり、忘れないようにするため記載いたしますので、もしもっとこうした方が良いよ、とかこれはちょっと。。。というものがあれば教えていただけますと幸いです。
※記事内容は随時更新します

対象のワードが文字列の中に含まれているか確認する

記述
keyWord = "mi"
words = "I love milk"
print(keyWord in words)

出力結果:True

※もし含まれていなければ「False」と出力されます。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?