LoginSignup
0
0

More than 3 years have passed since last update.

python startswith()

Posted at

引数の文字列から始まっているか確認する

object.startswith(string)

object = 'あいうえお'
string1 = 'あいう'
string2 = 'いうえ'
>>> print(object.startswith(string1))
True
>>> print(object.startswith(string2))
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