Computer Science, asked by Anonymous, 3 days ago

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

Answers

Answered by ADevill
1

Answer:

a= 10 ( assignment operator)

means the variable (a) is assigned a value which is equal to 10 (int)

a==10 ( equality operator)

means that a is equal to 10.

Answered by Anonymous
1

Answer:

In the statement a=10, the variable a is assigned value 10,

however in the statement a==10, the value of a is equated with 10.

The ‘=’ (equal to) sign is the assignment operator in Python, whereas, ‘==’sign is called the equal to operator.

Similar questions