sys.version
sys.version is a Python function in the Sys Module category. A string containing the Python interpreter version. The syntax is sys.version. Returns: String. A typical example: sys.version # "3.12.0 (main, Oct 2 2023, 12:00:00)". A close sibling is sys.argv, which a list of command-line arguments passed to a Python script. sys.argv[0] is the script name. A close sibling is sys.exit(), which exits the interpreter by raising SystemExit. arg can be an integer (exit code) or a string. A close sibling is sys.path, which a list of module search paths. Can be modified to add import directories. A close sibling is sys.platform, which a string identifying the platform ("linux", "win32", "darwin"). More about this category: System-specific parameters and functions — argv, path, exit. Related Sys Module entries: sys.argv, sys.exit(), sys.path, sys.platform, sys.stdin, sys.stdout. This page is part of the free Python Reference documentation covering 978+ functions, methods, and modules with examples and parameter details.