01 / 07
Asking whether it is in there
To take something out by number you have to know where it is. Start with the simpler question: is it even in there?
The tool is in, the same word you used on lists. The answer comes back as True or False.
text = "heavy rain today"print("rain" in text)print("snow" in text)Result
True False