3 ms·
python's use is the unusual one; the most common use (dating all the way back to algol) is to use it for assignment, so you can use = for equality. https://en.
by zem 2y ago
python's use is the unusual one; the most common use (dating all the way back to algol) is to use it for assignment, so you can use = for equality.
https://en.wikipedia.org/wiki/Assignment_(computer_science)#Notation https://en.wikipedia.org/wiki/Assignment_(computer_science)#...
- rob74 2y agoGo uses "==" for equality checks, "=" for assignments, and ":=" for "declaration/assignment with type inference" - so it's different from both Python (you can use ":=" as part of an expression in Go too, but you can also use "=") and Algol/Pascal (where it's used only for assignment).