+ 2
U gotta check out this.. the last statement is True? How? It should be false instead
'a' has 5 stored in it and 'b' has 3 so how can 5==3 can give true? https://code.sololearn.com/c3jcg20yXB93/?ref=app
6 ответов
+ 6
The equal operator (==) is evaluated before the assignment operator (=).
5 == 3+2 # True
a = 5 == 3+2 # a == True
3 == 3 # True
b = 3 == 3 # b == True
a == b # True
c = a == b # c == True
+ 6
Ohh thanks buddy 🙂... Now I come to understand that 'a' has True value not 5 and similarly 'b' has true value not 3...💡
+ 5
a doesn't have 5 stored in it, but 5==3+2 (= True). b=3==3 is also True. True == True is True
+ 5
Run it like this, you will see both I'd and type for a and b are the same:
my_boolean = True
print(my_boolean)
print(2 == 3)
print("hello" == "hello")
a=5==3+2
b=3==3
c=a==b
print(id(a))
print(id(b))
print(type(a))
print(type(b))
print(c)
+ 2
What this I'd is? Can u explain it to me?
0
What is this "a and b value is not equal" But it's says true how it is