About 322,000 results
Open links in new tab
  1. What do the symbols "=" and "==" mean in python? When is each …

    x = 4 tells Python that x is equal to 4. Nothing else is displayed because it is just a command. x == 4 on the other hand is asking if x is equal to 4. When we ask a question, the Python shell will …

  2. python - What exactly does += do? - Stack Overflow

    Jan 30, 2011 · In Python, += is sugar coating for the __iadd__ special method, or __add__ or __radd__ if __iadd__ isn't present. The __iadd__ method of a class can do anything it wants. …

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

    Apr 25, 2017 · What does the percentage sign mean? It's an operator in Python that can mean several things depending on the context. A lot of what follows was already mentioned (or …

  4. python - What does the caret (^) operator do? - Stack Overflow

    Dec 14, 2021 · Also, a ^= b is equivalent to a = a.__ixor__(b) (where __xor__ is used as a fallback when __ixor__ is implicitly called via using ^= but does not exist). In principle, what __xor__ …

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

    The code in the question is pseudo-code; there, := represents assignment. For future visitors, though, the following might be more relevant: the next version of Python (3.8) will gain a new …

  6. What does -> mean in Python function definitions? - Stack Overflow

    Jan 17, 2013 · The optional 'arrow' block was absent in Python 2 and I couldn't find any information regarding its meaning in Python 3. It turns out this is correct Python and it's …

  7. What is :: (double colon) in Python when subscripting sequences?

    In Python 3, your example range(N)[::step] produces a range object, not a list. To really see what is happening, you need to coerce the range to a list, np.array, etc. – PikalaxALT

  8. python - What does ** (double star/asterisk) and * (star/asterisk) …

    Aug 31, 2008 · Unpacking with ** is also useful when using python str.format. This is somewhat similar to what you can do with python f-strings f-string but with the added overhead of …

  9. python - What do these operators mean ... - Stack Overflow

    Mar 4, 2013 · The // operator does Python's version of integer division. Python's integer division is not exactly the same as the integer division offered by some other languages (like C), since it …

  10. What does asterisk * mean in Python? - Stack Overflow

    What does asterisk * mean in Python? [duplicate] Ask Question Asked 16 years, 5 months ago.