About 50 results
Open links in new tab
  1. syntax - Python integer incrementing with ++ - Stack Overflow

    In Python, you deal with data in an abstract way and seldom increment through indices and such. The closest-in-spirit thing to ++ is the next method of iterators.

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

    What does the := operand mean, more specifically for Python? Can someone explain how to read this snippet of code? node := root, cost = 0 frontier := priority queue containing node only explored :=

  3. python - What does ** (double star/asterisk) and * (star/asterisk) do ...

    Aug 31, 2008 · 15 In Python 3.5, you can also use this syntax in list, dict, tuple, and set displays (also sometimes called literals). See PEP 488: Additional Unpacking Generalizations.

  4. python - Why do I get "SyntaxError: invalid syntax" in a line with ...

    Why do I get "SyntaxError: invalid syntax" in a line with perfectly valid syntax? Asked 11 years, 8 months ago Modified 1 year, 5 months ago Viewed 1.3m times

  5. syntax - What do >> and << mean in Python? - Stack Overflow

    Apr 3, 2014 · 15 The other case involving print >>obj, "Hello World" is the "print chevron" syntax for the print statement in Python 2 (removed in Python 3, replaced by the file argument of the print() …

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

    Jan 17, 2013 · In Python 3.5 though, PEP 484 -- Type Hints attaches a single meaning to this: -> is used to indicate the type that the function returns. It also seems like this will be enforced in future versions …

  7. syntax - What do the symbols "=" and "==" mean in python? When is …

    Nov 11, 2025 · The difference is that is Python that is now equal to . , on the other hand, is Python if is equal to . There are places where you can't Python what is equal to, but you ask.

  8. How to check syntax of Python file/script without executing it?

    Nov 26, 2010 · I used to use perl -c &lt;filename&gt; to check the syntax of a Perl program and then exit without executing it. Is there an equivalent way to do this for a Python script?

  9. python - pip install returning invalid syntax - Stack Overflow

    Dec 4, 2017 · I've just installed python 3.6 which comes with pip However, in Windows command prompt, when I do: 'pip install bs4' it returns 'SyntaxError: invalid syntax' under the install word. …

  10. syntax - What is :: (double colon) in Python when subscripting ...

    Aug 10, 2010 · 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.