About 532,000 results
Open links in new tab
  1. 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() …

  2. mean in Python function definitions? - Stack Overflow

    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 …

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

    Jun 16, 2012 · There are two operators in Python for the "not equal" condition - a.) != If values of the two operands are not equal, then the condition becomes true. (a != b) is true.

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

    Aug 31, 2008 · A Python dict, semantically used for keyword argument passing, is arbitrarily ordered. However, in Python 3.6+, keyword arguments are guaranteed to remember insertion order.

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

    Sep 13, 2023 · There is no bitwise negation in Python (just the bitwise inverse operator ~ - but that is not equivalent to not). See also 6.6. Unary arithmetic and bitwise/binary operations and 6.7. …

  6. python - Is there a difference between "==" and "is"? - Stack Overflow

    Since is for comparing objects and since in Python 3+ every variable such as string interpret as an object, let's see what happened in above paragraphs. In python there is id function that shows a …

  7. What does [:-1] mean/do in python? - Stack Overflow

    Mar 20, 2013 · Working on a python assignment and was curious as to what [:-1] means in the context of the following code: instructions = f.readline()[:-1] Have searched on here on S.O. and …

  8. Does Python have a ternary conditional operator?

    Dec 27, 2008 · Python is a syntax-rich language with lots of idiomatic tricks that aren't immediately apparent to the dabbler. But the more you learn and understand the mechanics of the underlying …

  9. python - What is the purpose of the -m switch? - Stack Overflow

    Python 2.4 adds the command line switch -m to allow modules to be located using the Python module namespace for execution as scripts. The motivating examples were standard library …

  10. What does the "at" (@) symbol do in Python? - Stack Overflow

    Jun 17, 2011 · 96 What does the “at” (@) symbol do in Python? @ symbol is a syntactic sugar python provides to utilize decorator, to paraphrase the question, It's exactly about what does …

Refresh