0
what does == stand for??
9 Respuestas
+ 3
it is a comparison operator, you use it when you want to check if two expressions are equal. for example:
if a==5:
print("a is 5")
this way, you are saying: only if a equals 5 output to screen text "a is 5". the reason there is two equals symbols is to make it different from assignment. for example:
a=5
means that you want to assign value 5 to variable a.
+ 1
== is used to test equality, = is used for assignment. e.g.
x = 5
if x == 5:
print("five")
+ 1
Thanks guys!!
+ 1
it means equal too
+ 1
it compares 2 instances and will be true if they are equal,otherwise it is not!!!not only for arithmetic operations in python but also can be used for string comparing. (in python)where ascii or unicode values are looked up in the string.
+ 1
x==y stands for : does x equal to y? ( If you like my explanation please leave a mark up)
+ 1
equality
0
Two variable comparison
- 2
Means = equal to