Using this bit of code works as intended:
#!/usr/bin/python
import sys
good = sys.argv[1]
if 'good' in good:
print good
else:
print 'bad'
---
>>> ./script.py good
good
>>> ./script.py good123
good123
>>> ./script.py hi
bad
But when I add an or
to the if statement, the script 'stops' to work the way I thought it would work.
if 'good' or 'GOOD' or 'Good' in good:
I get:
>>> ./script.py hello123
hello123
Why is that ?