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.
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.
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.First, the first error description
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
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 lineBut 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.