Step 2: Parse the output with your eyes. The method is literally called "find".
This one-trick pony failure mode could perhaps have been fine for a guy who did Java and nothing but Java for 10 years, but you are supposedly the person who runs "pythonforengineers" website...
What about 'in'? index()? There are at least 3 canonical methods for basic string searches, and 8 if your include the more specialized forms (all of which are considered solutions).
Please refrain from personal attacks here. Save that for less reputable forums.
Step 2: Parse the output with your eyes. The method is literally called "find".
This one-trick pony failure mode could perhaps have been fine for a guy who did Java and nothing but Java for 10 years, but you are supposedly the person who runs "pythonforengineers" website...
100% correct call by the interviewer.