【已解决】list indices must be integers or slices, not str

647 阅读1分钟

小知识,大挑战!本文正在参与“程序员必备小知识”创作活动。

list indices must be integers or slices, not str
列表索引必须是整数或片,而不是字符串
不能使用键值对取值
在这里插入图片描述

在这里插入图片描述改为
user=authenticate(username=cd[0],
password=cd[0])