What is the difference between
== in Python? Is there any relation?
In Python, the operators
== serve very different purposes, and don’t have much relation at all other than similar syntax.
= operator is used for assignment, such as when assigning a value to a variable.
== operator is the relational operator for checking equality of two values. If the values are the same, it will return
True, and will return
# Assignment number = 3 # Comparison number == 30 # False