Latest web development tutorials

Python inclui exercícios 62

Python 100 Li Python 100 Li

Título: cadeia de pesquisa.

Análise do Programa: Nenhum.

Source Code:

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

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

O exemplo acima saída é:

2

Python 100 Li Python 100 Li