Aug-28-2017, 03:27 AM
(This post was last modified: Aug-28-2017, 03:27 AM by BerlingSwe.)
1. sys is a module that contains "system functionality". sys.argv is a list containing your script's command line arguments. One way to use it would be to write import sys and then sys.argv to access it.
from module import names is an alternative way to import a module that allows you to access the given names without naming the module. That is writing from sys import argv allows you to just write argv whereas import sys would require you to write sys.argv instead.
2.https://stackoverflow.com/questions/13666346/from-sys-import-argv-what-is-the-function-of-script
3-9 are all correct.
from module import names is an alternative way to import a module that allows you to access the given names without naming the module. That is writing from sys import argv allows you to just write argv whereas import sys would require you to write sys.argv instead.
2.https://stackoverflow.com/questions/13666346/from-sys-import-argv-what-is-the-function-of-script
3-9 are all correct.