How to Check Your Python Version | LearnPython.com
learnpython.com › blog › check-python-versionNov 19, 2020 · To check the Python version using the sys module, write: import sys print (sys.version) And you’ll get: # 3.8.3 (default, Jul 2 2020, 17:30:36) [MSC v.1916 64 bit (AMD64)] To check the Python version using the platform module, use the following code: import platform print(platform.python_version()) The output will be as follows: # 3.8.3 Both code snippets output the Python version in the string format. If necessary, you can also get the version number in the tuple format. The tuple will ...