sys module (sys.argv)
Në shqip: Moduli sys
ShpjegimiSQ
Moduli sys jep informacion për vetë Python-in dhe programin: sys.argv janë fjalët e shkruara pas emrit të programit në terminal, sys.exit() e mbyll programin, sys.version tregon versionin.
EnglishEN
The sys module gives information about Python and the program itself: sys.argv are the words typed after the program's name in the terminal, sys.exit() ends the program, sys.version shows the version.
Si ta mendosh
Si t'i japësh shoferit të taksisë adresën kur hip.
Lexoje në anglisht
Like giving the taxi driver the address as you get in.
Shembull kodipython
import sys
if len(sys.argv) < 2:
sys.exit("Shkruaj një emër")
print("Tung,", sys.argv[1])