RE Module Question.
Corrado Gioannini
gioco at nekhem.com
Tue Nov 6 04:35:17 EST 2001
On Tue, Nov 06, 2001 at 05:49:38AM +0000, Paul Winkler wrote:
[snip]
> You can do it like so:
>
> test = "this is spam"
> if test.find("spam"): print "found it"
this would fail if the sub-string to be found is at the beginning of the
string (find returning 0).
Corrado.
--
Corrado Gioannini
<gioco at nekhem.com>
"Thought is only a flash between two long nights,
but this flash is everything."
(H. Poincaré)
More information about the Python-list
mailing list