Last answered:

31 Oct 2022

Posted on:

30 Oct 2022

2

Difference Between == and is

What is the difference between == and is? Similarly, what is the difference between != and is not?
What different contexts would they be applied in?

1 answers ( 0 marked as helpful)
Instructor
Posted on:

31 Oct 2022

0

Hi Quinn!
Thanks for reaching out.
In Python, = means 'assign' and == plays the role of an equal sign. We use = to assign values to a variable and == to check if values are equal or not.
Hope this helps.
Best,
Ivan

Submit an answer