thecodezone.
The Code Zone

PYTHON / CHECK MEMBERSHIP BEFORE FINDING A POSITION · STEP 1 OF 4

Check membership before finding a position

GUIDED PRACTICE

Check membership before finding a position

Follow the current step and use Run & check this step. Your code carries forward.

Your code stays in one editor through every step. Word wrap is enabled.

Step 1 of 4

Keep the searchable values

Searching does not change list order. The first position is zero.

Your task

Make the next small change, keeping the working code from the previous step.

To pass this step:

  • Add tools = ["pen", "book", "lamp"].
  • Keep the earlier working code.

Press the play button labeled Run & check this step below the editor to run your code and see your check results.

A hint for this step

Searching does not change list order. The first position is zero.

Your editor is opening.

Each step builds on the last. Finish the current step before opening the next one; your code stays with you.

Code and completed steps save in this browser when signed out. Sign in to save across devices.

Resources for this step

Looking things up is part of programming. Compare these explanations with the task, then return and try the idea in your own code.

Ready to checkRun the checks to see your results here.

Replace your editor code?

Your current work will be replaced. Choose Cancel to keep it.