What does "==" mean in Python? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

What does "==" mean in Python?

Example: 1+1 == 2

15th Sep 2019, 3:55 PM
Kai McCormick
Kai McCormick - avatar
2 Respostas
+ 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