Top "Logical-operators" questions

Logical operators are symbols that aid in evaluating boolean expressions.

Python's equivalent of && (logical-and) in an if-statement

Here's my code: def front_back(a, b): # +++your code here+++ if len(a) % 2 == 0 && len(b) % 2 == 0: return a[:(…

python if-statement keyword logical-operators and-operator
How do you get the logical xor of two variables in Python?

How do you get the logical xor of two variables in Python? For example, I have two variables that I …

python logical-operators
Logical operators ("and", "or") in DOS batch

How would you implement logical operators in DOS Batch files?

batch-file cmd logical-operators windows-console
Simple logical operators in Bash

I have a couple of variables and I want to check the following condition (written out in words, then my …

bash logical-operators
Logical XOR operator in C++?

Is there such a thing? It is the first time I encountered a practical need for it, but I don't …

c++ operators logical-operators
Boolean operators && and ||

According to the R language definition, the difference between & and && (correspondingly | and ||) is that the former is …

r logical-operators boolean-operations or-operator and-operator
Differences in boolean operators: & vs && and | vs ||

I know the rules for && and || but what are & and |? Please explain these to me with an …

java bitwise-operators logical-operators boolean-logic
Logical Operators, || or OR?

I remember reading a while back in regards to logical operators that in the case of OR, using || was better …

php operators logical-operators or-operator
SQL Logic Operator Precedence: And and Or

Are the two statements below equivalent? SELECT [...] FROM [...] WHERE some_col in (1,2,3,4,5) AND some_other_expr and SELECT [...] FROM [...] WHERE …

sql logical-operators operator-precedence
Javascript logical "!==" operator?

I am getting back into web development, and have been trying to go over the nuances of jscript recently. I …

javascript syntax logical-operators