About 4,410,000 results
Open links in new tab
  1. python - What does ** (double star/asterisk) and * (star/asterisk) …

    Aug 31, 2008 · 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 .

  2. syntax - What does the "at" (@) symbol do in Python? - Stack …

    Jun 17, 2011 · Decorator Syntax: A google search for "decorator python docs" gives as one of the top results, the "Compound Statements" section of the "Python Language Reference." …

  3. 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 …

  4. syntax - Python integer incrementing with ++ - Stack Overflow

    Python doesn't really have ++ and --, and I personally never felt it was such a loss. I prefer functions with clear names to operators with non-always clear semantics (hence the classic …

  5. 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 …

  6. What is Python's equivalent of && (logical-and) in an if-statement?

    Sep 13, 2023 · Note that this is pseudo-code not Python code. In Python you cannot create functions called and or or because these are keywords. Also you should never use "evaluate" …

  7. Is there a "not equal" operator in Python? - Stack Overflow

    Jun 16, 2012 · Python is dynamically, but strongly typed, and other statically typed languages would complain about comparing different types. There's also the else clause: # This will …

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

    Apr 3, 2014 · 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 …

  9. python - How to fix invalid syntax error at 'except ValueError ...

    Oct 5, 2017 · There are two things wrong here. First, You need parenthesis to enclose the errors: except (ValueError,IOError) as err:

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

    While it makes sense here to have answers that show problems caused by other kinds of valid syntax, this is an example where the version of Python used causes the syntax not to be valid. …