Please when we use the = and == also when we use elif and else what is the difference beetwen them?

what is the difference between = and ==
and the difference between elif and else

I’ll assume you’re referring to python. When all else fails it helps to remember that google is your friend as is the documentation for the programming language. elif and else are used in control flow statements (used with if statements for conditional execution. else is optional).


The single = is used to assign a value to a variable.
ex: x = 'cat'

The double == is used to check equality (or used in comparison), or, an equality operator.

ex: if y == this, etc.

1 Like

yes thank you very much


This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.