Latest web development tutorials

Pythonは演習62、

Pythonの100リー Pythonの100リー

タイトル:検索文字列。

プログラム解析:なし。

ソースコード:

#!/usr/bin/python
# -*- coding: UTF-8 -*-

sStr1 = 'abcdefg'
sStr2 = 'cde'
print sStr1.find(sStr2)

上の例の出力は、次のとおりです。

2

Pythonの100リー Pythonの100リー