0

what does == stand for??

14th Jul 2016, 1:44 PM
Musthaque Ch
Musthaque Ch - avatar
9 Answers
+ 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.
14th Jul 2016, 2:14 PM
RedAnt
RedAnt - avatar
+ 1
== is used to test equality, = is used for assignment. e.g. x = 5 if x == 5: print("five")
14th Jul 2016, 2:16 PM
Doug Irvine
Doug Irvine - avatar
+ 1
Thanks guys!!
14th Jul 2016, 2:22 PM
Musthaque Ch
Musthaque Ch - avatar
+ 1
it means equal too
14th Jul 2016, 5:41 PM
Louis Gabrie
Louis Gabrie - avatar
+ 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.
15th Jul 2016, 3:05 PM
Charith
+ 1
x==y stands for : does x equal to y? ( If you like my explanation please leave a mark up)
21st Jul 2016, 10:25 AM
Ivan
Ivan - avatar
+ 1
equality
23rd Jul 2016, 3:07 PM
Ajeet Chouhan
Ajeet Chouhan - avatar
0
Two variable comparison
14th Jul 2016, 3:49 PM
Murali Gandham
Murali Gandham - avatar
- 2
Means = equal to
15th Jul 2016, 9:44 AM
hacker charlo
hacker charlo - avatar