ValueError: not enough values to unpack (expected 4, got 1)

前端 未结 4 1604
甜味超标
甜味超标 2020-12-31 13:28
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         


        
4条回答
  •  攒了一身酷
    2020-12-31 13:54

    I think you are running the following command:

    python script.py
    

    You are writing a program which is aksing for 4 inputs and you are giving onle one. That's why you are receiving an error. You can use the below command:

    python script.py Hello How Are
    

提交回复
热议问题