About 9,150,000 results
Open links in new tab
  1. slice - How slicing in Python works - Stack Overflow

    How does Python's slice notation work? That is: when I write code like a[x:y:z], a[:], a[::2] etc., how can I understand which elements end up in the slice? See Why are slice and range upper-bound

  2. 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 print() function).

  3. python 2 instead of python 3 as the (temporary) default python?

    Aug 30, 2011 · python2 2.7.2-2 which is also installed on my system but I do not know how to make it as the (temporary) default python. The python script starts with

  4. math - `/` vs `//` for division in Python - Stack Overflow

    In Python 2.2 or later in the 2.x line, there is no difference for integers unless you perform a from __future__ import division, which causes Python 2.x to adopt the 3.x behavior. Regardless of the …

  5. How to install Python 2 on macOS 12.3+ - Stack Overflow

    Apr 4, 2022 · Python Deprecations Python 2.7 was removed from macOS in this update. Developers should use Python 3 or an alternative language instead. (39795874) I understand we need to migrate …

  6. dictionary - What is the difference between dict.items () and dict ...

    One is a list, the other an iterator (depending on the Python version...) So the applicable differences between dict.items () and dict.iteritems () are the same as the applicable differences between a list …

  7. End of support for python 2.7? - Stack Overflow

    Jan 29, 2011 · Is there a known date/timeframe when python 2.7 will not be supported any more in favor of python 3?

  8. How to install pip on Python 2.7 in 2021 - Stack Overflow

    Jul 14, 2021 · I have legacy production servers that are still running Python 2.7.6. We have a local environment built from the docker image for ubuntu 14.04 intended to replicate that environment …

  9. 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 hinted at) in the …

  10. How to use 2to3 properly for python? - Stack Overflow

    Dec 8, 2013 · I have some code in python 2.7 and I want to convert it all into python 3.3 code. I know 2to3 can be used but I am not sure exactly how to use it.