python: Use Equality Operator to Examine the Price of Items in Python

(*1*)

Mridu Bhatnagar: [0:02] Examine the gadgets having equivalent values the use of the equality operator. Variable a is assigned to an integer object having worth 40. Allow us to assign variable b to integer object having worth 40. Now, we want to evaluate each the gadgets. For evaluating we will do a == b.

[0:32] Double equivalent to is our equality operator. The outcome that you just see is True. The result’s true as a result of worth of each the gadgets are identical.

[0:50] Now, allow us to evaluate the gadgets having unequal values. Allow us to assign a variable c to an integer object having worth 50. Allow us to assign a variable d to an integer object having worth 60. Then, we will be able to do c == d.

[1:20] Double equivalent to is our equality operator. While you do Input, the outcome now’s False. That is so, as a result of each the values of gadgets had been other.