How to check the Python version using Windows Command Line? Print(type(platform.python_version_tuple()) To get the major information on the version of python, use the following script as shown below: – Python command print(type(sys.version_info)) To get the tuple information on the version of python, use the following script as shown below: – Output Sys.version_info(major=3, minor=10,micro=7,releaselevel=’final’,serial=0) To get the information on the version of python, use the following script as shown below: Refer to the following web-based interpreter screenshot: Print("Current Python Version-", python_version()) Python code: from platform import python_version Use the following code in the web-based interpreter as shown below: – To execute the above script, invoke python first in the command line to get the above results. Refer to the following command line screenshot: The following code can be used for the sys module as shown below:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |