not Keyword in Ruby
The keyword “not” is different from the others. The “not” keyword gets an expression and inverts its boolean value – so given a true condition it will return false. It works like “!” operator in Ruby, the only difference between “and” keyword and “!” operator is “!” has the highest precedence of all operators, and “not” one of the lowest.
Welcome to GeeksforGeeks