0

I have a script where I'm asking it to look for a phrase which is along the lines of:

if "1" in response and "2" in response and "(" + age + ")" in response:

but I need it to do something like this:

if "1" in response and "2" in response and ( ("(" + age + ")") or ("[" + age + "]")  in response:

to account for the symbol being either ( or [ around age - it then passes the verification and moves to the next step. Right now I'm missing anything with a [ bracket.

I tried it a long these lines but couldn't figure these expressions out.

Maurice Meyer
  • 17,279
  • 4
  • 30
  • 47
  • 1
    `... ( ("(" + age + ")" in response) or ("[" + age + "]" in response))`. Broadcast *in* to both operands in parentheses, otherwise it will evaluate the expression inside to the 1st term, as its truth value is 1 (so the *or* and what comes after makes absolutely no difference). – CristiFati Dec 22 '22 at 16:18

0 Answers0