100-062

查找字符串。
1 #! /usr/bin/env python
2 # -*- coding:utf-8 -*-
3 '''
4 查找字符串。
5 '''
6 sStr1 = 'abcdefg'
7 sStr2 = 'cde'
8 print (sStr1.find(sStr2))

 

posted @ 2018-05-26 19:27  睡到自然醒的猪  阅读(57)  评论(0)    收藏  举报

xliaoe at 111 dot com ; 返回顶部