0 votes
1 view
in Python by (50.5k points)

I am originally a C programmer. I have seen numerous tricks and "hacks" to read many different arguments.

What are some of the ways Python programmers can do this?

1 Answer

0 votes
by (107k points)
edited by

To read different arguments in Python we will use sys.argv() method:-

import sys


sys.argv is a list that contains all the arguments passed to the script on the command line. 

So below mentioned code validates that sys.argv()is a list:-

import sys 



To know more about this you can have a look at the following video tutorial:-


Welcome to Intellipaat Community. Get your technical queries answered by top developers !