69pao国产精品视频-久久精品一区二区二三区-精品国产精品亚洲一本大道-99国产综合一区久久

Python 練習(xí)實(shí)例62

python 練習(xí)實(shí)例62

python 編程100例python 編程100例

題目:查找字符串。  

程序分析:無(wú)。

程序源代碼:

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

sstr1 = 'abcdefg'
sstr2 = 'cde'
print sstr1.find(sstr2)

以上實(shí)例輸出結(jié)果為:

2

python 編程100例python 編程100例

下一節(jié):python 練習(xí)實(shí)例63

python 編程100例

相關(guān)文章