0
1

More than 3 years have passed since last update.

文字が含まれているかいないかの判別

Last updated at Posted at 2021-02-28

備忘録.こんな風にできるとは思わんだ.

a = input()
if "RRR" in a:
  print(3)
elif "RR" in a:
  print(2)
elif "R" in a:
  print(1)
else:
  print(0)
0
1
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
1