variableName=["display","screen","sound""audio"]
fileName=["PPP", "Abc"]
P1="PPP"
d="display"
s="screen"
ss="sound"
a="audio"
d=P1
loop=True
def CH(variableName, fileName, loop):
while loop==True:
Up=input("What is your problem?\n")
if (variableName) in Up.lower():
file = open(fileName + ".txt", "r")
whole= file.read()
print(whole)
file.close()
loop=False
else:
loop=True
continue**
CH(variableName, fileName, loop)
I am trying to create a function that read your input and give an answer by using keywords. But the error ""TypeError: 'in ' requires string as left operand, not list"" keeps coming up and I can seem to fix it
if (variableName) in Up.lower():to do?