Sys Module in Python
Python sys.version
In this example, sys.version is used which returns a string containing the version of Python Interpreter with some additional information. This shows how the sys module interacts with the interpreter. Let us dive into the article to get more information about the sys module.
Python3
import sys print (sys.version) |
Output:
3.6.9 (default, Oct 8 2020, 12:12:24)
[GCC 8.4.0]
Python sys Module
The sys module in Python provides various functions and variables that are used to manipulate different parts of the Python runtime environment. It allows operating on the interpreter as it provides access to the variables and functions that interact strongly with the interpreter. Let’s consider the below example.