- 3
What does == mean
8 odpowiedzi
+ 3
It's the operator for equality.
It checks whether the left operand is equal to the right operand. The result is a boolean True or False.
5 == 5 - result is True.
5 == 6 - result is False.
"Peter" == "petar" - False
"Петър" == "Peter" - False
"Peter" == "Peter" - True
+ 2
It is something that checks if the thing to the left is the same as the thing to the right.
+ 2
it check if the two variables is equal and returns a boolean.
0
For example:
x=0
y=0
If x==y:
print("It is equal.")
0
The boolean also determines wether to run the indented code (True) or ignore it (False).
0
Thanks