+ 1

What happens if you write ==?

Python

22nd Jun 2019, 8:46 AM
Tim Steiner
2 odpowiedzi
+ 4
Tim Steiner It checks if 2 things are equivalent to each other. For example: 5 == 5 >>> True 10 == 9 >>> False
22nd Jun 2019, 9:08 AM
aceisace
aceisace - avatar
+ 2
== is a comparison operator. It is like any arithmetic (+, -, /, ...) operator, but it always returns a boolean (either True or False). == in words means "is equal to" 4 == 3: "4 is equal to 3": False 2 == 2: "2 is equal to 2": True
22nd Jun 2019, 9:59 AM
Seb TheS
Seb TheS - avatar