![]() If we want to compare any expressions using the not equal operator in conditional statements like if,if-else, then we can use it. “not equal” Operator ( != ) in conditional statements Comparing double type 34 with string type 34.Comparing integer type 34 with double type 34.Comparing integer type 34 with string type 34.In this example, we will demonstrate the above scenario. string type and double type are different.Integer type and double type are the same.Integer type and string type are different.If the variable is the same, but the data type of variable is different, In that case, thisPointer is not equal to python, hence the output is True.34 is equal to 34, hence the output is False.34 is not equal to 56, hence the output is True.# Check "thisPointer" is not equal to "python". In this example, we will apply the != operator on different operands. ![]() Where operand1 is the first operand and operand2 is the second operand.
0 Comments
Leave a Reply. |