2013-07-15 文字列検索 Python 15-150956.py str = 'chapter01_hoge' print str[0:8] # chapter0 str = 'chapter02_fuga' print 'chapter0' in str # True