How to get the Python version on your system#
Getting the version number of your Python installation is not as straightforward as you might have guessed. But once you get the pythonic way of doing things, the implementation starts to make sense.
Open a Python shell and type the following:
>>> import sys >>> sys.version[:5]
- What would happen if you just do
- What is the pythonic way?
import thisat the Python console.
- Is there any other way to know the Python version?