Command line interface commands

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.

Hey @AI2010!

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 [inputs]

where inputs would be some strings as inputs.

import sys


If this script is run using:

python Hello,world

it will output:

1 Like

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.