大家讲道理2017-04-17 17:37:52
There are more variables on the left than on the right, similar to a, b, c, d = [1]
. It seems that you click to run directly on IDLE. You need to run it with parameters in the command.
黄舟2017-04-17 17:37:52
First, the first error description
script, first, second, third = argv
The unpacking error of this statement is because the argv variable is not enough to be assigned to the variable on the left, and the file needs to be executed like this
python 24.py argv1 argv2 argv3
When executing the file, it needs to be followed by at least three parameters
The second error is an error indicating that multiple statements are on the same line. Multiple statements must be separated by semicolons on the same line. >>>
This represents one line
But the questioner probably wants the code in the script to run on idle, but the parameter control of sys.argv cannot be realized on idle.