Latest web development tutorials

Python include esercizi 62

Python 100 Li Python 100 Li

Titolo: stringa di ricerca.

Analisi del programma: Nessuno.

Source Code:

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

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

L'output sopra esempio è:

2

Python 100 Li Python 100 Li