About 7,540,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. 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

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

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

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

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

  7. python - ImportError: No module named requests - Stack Overflow

    Mac OS X and Linux Python 2: sudo pip install requests Python 3: sudo pip3 install requests if you have pip installed (pip is the package installer for Python and should come by default with your Python …

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

  9. ubuntu - How to install pip for Python 2 - Stack Overflow

    4 I would suggest that you use pyenv to manage multiple versions of Python, because it can often get problematic. Right now the solution to the problem would depend on the configuration you have for …

  10. Python 3 f-string alternative in Python 2 - Stack Overflow

    Python 3 f-string alternative in Python 2 Asked 6 years, 8 months ago Modified 1 year, 1 month ago Viewed 23k times