Needles in a Haystack

I haven’t met a single experienced Pythonist to date who has not come across one or more of the following scenarios.

1.

Can you predict the output of this code?

Get hands-on with 1200+ tech skills courses.