Home Blog Links Now

Getting the Python version at runtime

2021-10-10 python
import sys

print(sys.version)

Output:

3.9.7 (default, Aug 31 2021, 13:28:12)
[GCC 11.1.0]