In python, how can I print lines that do NOT contain a certain string, rather than print lines which DO contain a certain string:
The problem isn’t your use of not, it’s that or doesn’t mean what you think it does (and if you think it through, it couldn’t): You’re asking whether the expression (“StatusRequest” or “StatusResponse”) appears in line. But that expression is just the same thing as “StatusRequest”. Put it in English: you’re not trying to say “if neither of these is in line”. Python … Read more