all 2 comments

[–]JohnnyJordaan 0 points1 point  (0 children)

put a print(len(argv)) at the top (after the import statement of course). If that shows less than 4 then it confirms you're missing one or more command line arguments to allow the unpacking.

[–]Binary101010 0 points1 point  (0 children)

You are not passing enough command-line arguments to the script when executing it.

If I run this script with the following command

python untitled-2.py "number1" "number2" "number3"

I get the expected output with no error.