Getting the Python version at runtime

• 1 min read
import sys

print(sys.version)

Output:

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