@James21, The “in” operator may solve your problem.
First, let’s know what a “in” operator is:
in and not in are known as membership test operators.
in False if the value is not found in the sequence,
not in False if the value is found in the sequence
The solution to your code is:
if "boom" not in somestring: