In other coding sites there is a command line interface where you can type commands. For the sys.argv function if I want to test my code by inputting a value how would I do that? There is no actual code yet.
sys.argv is a list, its first item is the file name, followed by a list of inputs.
To give it inputs, you would run your code like this:
python fileIWantToRun.py [inputs]
inputs would be some strings as inputs.
import sys print(sys.argv)
If this script is run using:
python main.py Hello,world
it will output:
And in order to do this:
You would use the Shell tab.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.