pass a parameter from the command line in python

Use sys.argv to obtain command-line arguments:

$ python3 -c "import sys; print(sys.argv[1].lower())" HELLO
hello
$

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top