+ 15
What is the sys module ?
What is it used for? and can it be used on the SLCP(sololearn code playground)
6 Respuestas
+ 6
From Google.
sys — System-specific parameters and functions. This module provides access to some variables used or maintained by the interpreter and to functions that interact strongly with the interpreter. It is always available. ... A tuple of strings giving the names of all modules that are compiled into this Python interpreter.
+ 15
Well the sys module allows user to use stdin() and stdout(), as well as stderr(), but we can also utilize sys.argv(). It is pretty simple and very useful once you learn it. The idea of sys.argv is to allow you to pass arguments through to Python from the command line.
+ 5
Try this code:
import sys
If it works without errors (and it does) you can use it.
More information can be found here: https://docs.python.org/3/library/sys.html
+ 3
https://code.sololearn.com/csTae6tX7D4l/?ref=app
this might help
+ 2
import sys and import os
+ 2
whenever you want to find more about a certain module just import it, and then call dir() and help(). python -c "import sys; dir(sys);help(sys)"