← All hands-on practice
Python · 6 min
Flip the line
status.py prints in when the line is an accepted login, and out when it is not. The line is accepted. Change it so the other word prints. One extra task, not a new path.
Start it: free, in your browser, no account
What you will do
- Change the line so it is a failed login, not an accepted one.
- Run status.py. It prints out.
This Python only understands if "text" in name: and else: under it. sed only replaces one value.