+ 1

What does "==" mean in Python?

Example: 1+1 == 2

15th Sep 2019, 3:55 PM
Kai McCormick
Kai McCormick - avatar
4 odpowiedzi
+ 1
The == operator is used for comparison so in your example it compare 1+1 to 2 then it will evaluate to true
15th Sep 2019, 3:59 PM
Eliya Ben Baruch
Eliya Ben Baruch - avatar
+ 1
As said in Geekforgeeks: "The == operator compares the values of both the operands and checks for value equality" == returns True if right value and left value are equal. If they're not, it will return False
15th Sep 2019, 4:00 PM
ΛM!N
ΛM!N - avatar