← 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
- Read gate.py.
- Change the if so it looks for Failed.
- 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.