from sys import argv
script, first, second, third = argv
print(\"The script is called: \", script)
print(\"The first variable is: \", first)
print(\"The second vari
argv
variable contains command line arguments. In your code you expected 4 arguments, but got only 1 (first argument always script name). You could configure arguments in pycharm
. Go to Run
-> Edit Configurations
. Then create a new python configuration. And there you could specify Script parameters
field. Or you could run your script from command line as mentioned by dnit13.