if "needle" in haystack:
      print ('haystack.__contains__("needle")')
Is probably the obvious/canonical answer to the question of trying to find a substring.

So obvious that -to be fair- I blanked for a moment too. But 'in' is an operator, not a method (even though it calls __contains__ under the hood) . The question might have been slightly malformed?

No, there's literally a "find" str method.

str.find(sub[, start[, end]])

"Return the lowest index in the string where substring sub is found within the slice s[start:end]. Optional arguments start and end are interpreted as in slice notation. Return -1 if sub is not found."

Your instinct to resort to "in" is correc,t as it's generally slower than the "in" membership test, but the interviewer has even allowed the use of Google. Blanking out after that is really bad.