PATCH//NOTES Open it in the app
← All hands-on practice
Python · 8 min

Only if it matches

gate.py only prints when the word it is looking for is in the line. Right now it is looking for the wrong word. Read it, change that word, then run it.

Start it: free, in your browser, no account

What you will do

  1. Read gate.py.
  2. Change the if so it looks for Failed.
  3. Run gate.py. It should print blocked.

A simulated Ubuntu-style shell. This Python only understands if "text" in name: and the indented print under it. sed only replaces one value.