Parentheses in Python Conditionals
The other answers that Comparison takes place before Boolean are 100% correct. As an alternative (for situations like what you’ve demonstrated) you can also use this as a way to combine the conditions: if socket.gethostname() in (‘bristle’, ‘rete’): # Something here that operates under the conditions. That saves you the separate calls to socket.gethostname and … Read more