a = 5

b = 10

if b < a:

print(“a is greater than b”)

elif a == b:

b = 5

print(“a and b are equal”)

else:

print(“b is greater than a”)

The solution to the above code is “b is greater than a”.

Help me understand on the elif we have mentioned b=5, why wouldn’t the initial b value of 10 now changed to 5 and provided current value of b is 5, then the solution would be “a and b are equal”.