Earlier quoted context omitted.
I don't understand how you jumped to the membership test instead of literally the .find() method on a string? The interviewer is not asking to solve a problem here, they're asking for a simple ability to follow instructions, hence the offer to use Google to find the correct answer. You could make a very solid case for using "in" (it is 2-4x faster), but only after you've solved the task at hand, this is what is expec…
The unfortunate answer is just that I didn’t think of .find before thinking of “in,” haha. Nothing too clever going on in my head. The existence of a more conventional .find method does some damage to my original point. Oops.
The reason is the intent behind their question, which they don't vocalize.
This question means we are dealing with an extremely broad hiring funnel designed to fail people who can't FizzBuzz and need to keep answers at MVP level.
In other words, if you are asked to put out a fire use a bucket of sand, not a state-of-the-art fire extinguisher.