the items in the list are words not numbers I just used numbers as an example
here is my code
is if pause is in the text I want it go check the position of pause in the CMD_INPUTS and return the item that's in that same position but in CMD_OUTPUTS sorry I should've been more clear
also note that its not like a one time return the return will always change based on the input
here is my code
def cmd(text): CMD_INPUTS = ['pause'] CMD_OUTPUTS = ['input keyevent 85'] for word in text.split(): if word.lower() in CMD_INPUTS: returnthere will be more inputs and outputs but I only have one in there for now. What I want to do
is if pause is in the text I want it go check the position of pause in the CMD_INPUTS and return the item that's in that same position but in CMD_OUTPUTS sorry I should've been more clear
also note that its not like a one time return the return will always change based on the input