Question #6624
Submitted by Answiki
on 09/12/2022 at 06:03:52 PM UTC
How to display the current version from a Python script ?
Merged questions
Answer
Submitted by Answiki
on 09/12/2022 at 06:04:53 PM UTC
There are several methods to display the version of Python.
On the command line, the following displays the current version:
python --version
In a Python script or interpreter, the following statements display the current version:
import sys
print("Python version")
print (sys.version)
print("Version info.")
print (sys.version_info)
Answer by Answiki on 09/12/2022 at 06:04:53 PM
There are several methods to display the version of Python.
On the command line, the following displays the current version:
python --version
In a Python script or interpreter, the following statements display the current version:
import sys
print("Python version")
print (sys.version)
print("Version info.")
print (sys.version_info)
Question by Answiki 09/12/2022 at 06:03:52 PM
How to display the current version from a Python script ?
# | ID | Query | URL | Count |
---|
Icons proudly provided by Friconix.