Computer Science, asked by shahnazqureshi208, 10 months ago

What is the difference between the following statements?
a=10 and a== 10



From review Python

Answers

Answered by musicbag05
5

a=10 is assignment operator

a=== 10 is relational operator

hope it helps

Answered by Soban06
9

Answer: These are two different things. How?

Explanation:

When you say a = 10, you are declaring the value of the variable a to be 10.

So a will store the value of a to 10.

But when you say a == 10, you are checking that is a equal to 10. This can be used in if statements when you are checking something is equal to something else.

Hope it helps.

Similar questions