I just came across this here, always used like this:
if string1.find(string2) <> -1:
pass
What does the <>
operator do, and why not use the usual ==
or in
?
Sorry if that has been answered before, search engines don't like punctuation.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…