# searching easy

How Many Steps Until You Find It?

You're checking mailboxes for the golden ticket, one by one, starting from the first. πŸ“¬

You get a list of boxes and a target. Print how many boxes you have to open before you find it β€” opening the box it's in counts too! If it's nowhere, print not here.

Example:

Input: boxes = ["junk", "bills", "ticket", "junk"], target = "ticket" Output: 3

We open box 1 (junk, no), box 2 (bills, no), box 3 (ticket, yes!) β€” that's 3 boxes opened in total.

πŸ’‘ need a hint?

srch-steps-until-found.pyπŸ”’ given lines are locked β€” write your code in between
loading...