About 326,000 results
Open links in new tab
  1. Why there is 2 equals signs ia an if statement on python

    Dec 10, 2020 · For the same reason many languages do so; because = is already being used for assignment. op = "+" is a request to assign the string to op; op == "+" is asking if op already …

  2. What do the symbols "=" and "==" mean in python? When is each …

    3 The simple answer is = is an assignment operator, == is a comparison operator. And you are wrong in saying that == can be used in any situation when = works. For example if I wanted to …

  3. What does colon equal (:=) in Python mean? - Stack Overflow

    In Python this is simply =. To translate this pseudocode into Python you would need to know the data structures being referenced, and a bit more of the algorithm implementation. Some notes …

  4. What does the percentage sign mean in Python [duplicate]

    Apr 25, 2017 · It's an operator in Python that can mean several things depending on the context. A lot of what follows was already mentioned (or hinted at) in the other answers but I thought it …

  5. python - Is there a difference between "==" and "is ... - Stack …

    In python there is id function that shows a unique constant of an object during its lifetime. This id is using in back-end of Python interpreter to compare two objects using is keyword.

  6. operators - What does ":=" do? - Stack Overflow

    Nov 13, 2018 · 1 A number of programming languages, most notably Pascal and Ada, use a colon immediately followed by an equals sign (:=) as the assignment operator, to distinguish it from a …

  7. comparison - double equals vs is in python - Stack Overflow

    For example, at least in my Python 3.6, 1 is 1 and a = 1;b = 1;a is b are both True but 1 is 10 / 10 is False.

  8. Usage of colon and equals signs in Python - Stack Overflow

    Aug 20, 2020 · The colon helps the code flow into the following indented block. A single equal sign is used to assign a value to a variable, a double equal sign is used for conditions, like if …

  9. What does the /= operator mean in Python? - Stack Overflow

    Jan 18, 2018 · What does the operator /= (slash equals) mean in Python? I know |= is a set operator. I have not seen /= previously though.

  10. Is there any python operator that equivalent to javascript triple …

    Jun 8, 2017 · The ordinary == operator in Python already works much like the === operator in JavaScript, in that it won't do string conversions. However, it does not compare types.