无法解决(列表索引超出范围)

时间:2018-12-17 18:58:53

标签: python-2.7 computer-science

python编程语言的新手。尝试处理以下代码:

class test:

    def __init__(self, s_id, c_id, d_id,username,password,db):
        self.s_id = s_id
        self.c_id = c_id
        self.d_id = d_id        
        self.username = username
        self.password = password
        self.db = db

s_id = sys.argv[1]
c_id = sys.argv[2]
d_id = sys.argv[3]
u_id = sys.argv[4]
p_id = sys.argv[5]
db_id = sys.argv[6] 

但收到以下错误消息:

IndexError: list index out of range

已经几个小时了,但仍然没有得到确切的问题。试图在网上看,但到目前为止对我来说还没有任何意义。任何对此的解释将非常有帮助。谢谢

0 个答案:

没有答案