← All hands-on practice
Python · 8 min
The whole value
status is the word down. match.py asks if it is exactly do. A piece of the word is not the whole word. Read it, run it, then change the test so it asks for the whole word.
Start it: free, in your browser, no account
What you will do
- Read match.py.
- Run match.py. It prints check it.
- Change the test so it asks if status is down.
- Run match.py again. It prints serving.
This stop adds if name == "text":. It is the whole value, not a word inside it. else: can sit under it. No !=, no and, no elif.