TypeError: 'in ' requires string as left operand, not list (Function)

后端 未结 3 1297
既然无缘
既然无缘 2021-01-28 16:13
variableName=[\"display\",\"screen\",\"sound\"\"audio\"]
fileName=[\"PPP\", \"Abc\"]
P1=\"PPP\"
d=\"display\"
s=\"screen\"
ss=\"sound\"
a=\"audio\"
d=P1
loop=True
def CH         


        
3条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-28 16:40

    I think you've got the logic of your in statement backwards. You should be checking

    if Up.lower() in variableName:
    

    not the other way around.

提交回复
热议问题