right, this is python, use 'not' instead of '!'