I'm working with Python v2, and I'm trying to find out if you can tell if a word is in a string.
I have found some information about identifying if the word is in the string - using .find, but is there a way to do an IF statement. I would like to have something like the following:
if string.find(word):
print("success")
Thanks for any help.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…