+1 vote
in Python by
Does Python have a string 'contains' substring method?

Can someone help to get string.contains or string.indexof method in Python.

I want to do:

if not somestring.contains("blah"):

   continue

1 Answer

0 votes
by
You can use the in operator:

if "blah" not in somestring:

    continue
...