+ 1

What is mean of == in python

15th Apr 2018, 7:21 AM
Ishan
4 Answers
+ 8
compares to, compares two value and returns true if they have equal values regardless of type
15th Apr 2018, 7:22 AM
᠌᠌Code X
᠌᠌Code X - avatar
+ 8
Brains is right but I think that "regardless of type" might be misunderstood. This does not mean that '5' == 5 which will return False
15th Apr 2018, 8:12 AM
Martin Möhle
Martin Möhle - avatar
+ 3
== means 'is set to' (equivalence) = means 'is' (identity)
27th Apr 2018, 12:21 PM
Johannes
Johannes - avatar