About 743,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 …

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

    Apr 25, 2017 · What does the percentage sign mean in Python [duplicate] Asked 16 years, 4 months ago Modified 1 year, 11 months ago Viewed 350k times

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

  4. mean in Python function definitions? - Stack Overflow

    Jan 17, 2013 · It's a function annotation. In more detail, Python 2.x has docstrings, which allow you to attach a metadata string to various types of object. This is amazingly handy, so Python …

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

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

    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 …

  7. The tilde operator in Python - Stack Overflow

    Nov 29, 2011 · In Python, for integers, the bits of the twos-complement representation of the integer are reversed (as in b <- b XOR 1 for each individual bit), and the result interpreted …

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

  9. python - Iterating over dictionaries using 'for' loops - Stack Overflow

    Jul 21, 2010 · Why is it 'better' to use my_dict.keys() over iterating directly over the dictionary? Iteration over a dictionary is clearly documented as yielding keys. It appears you had Python 2 …

  10. python - How do I execute a program or call a system command?

    How do I call an external command within Python as if I had typed it in a shell or command prompt?