title: How can I check if a variable is inside a list during a for loop in robot framework?
body: <p>first time posting here. I've a feeling that this is a <em>really</em> dumb question, but for some reason my code keeps failing and I just can't put my finger on what's wrong.</p>
  
  <p>Here's is what I have:</p>
  
  <pre><code>*** Settings ***
  Library  Selenium2Library
  Library  OperatingSystem
  Library  String
  Library  Collections
  
  
  *** Test Cases ***
  Test Robot Framework Logging
      @{ALLOWED}=  Create List  /page1  /page2  /page3
      ${ControllersList}=  Get File   ${EXEC_DIR}/Resources/controllers.txt
      @{PAGES}=  Split to lines  ${ControllersList}
      :FOR  ${PAGE}  IN  @{PAGES}
      \  Run Keyword If  '${PAGE} IN @{ALLOWED}'  Log  Testing  WARN
      [Teardown]  Close Browser
  </code></pre>
  
  <p>This is the output:</p>
  
  <pre><code>Evaluating expression ''/page1 IN [u'/page1', u'/page2', u'/page3']'' failed: SyntaxError: invalid syntax (&lt;string&gt;, line 1)
  </code></pre>
  
  <p>If I change the condition to something like this it works:</p>
  
  <pre><code>'${PAGE} == /page1'
  </code></pre>
  
  <p>I checked the <a href="http://robotframework.org/robotframework/latest/libraries/BuiltIn.html#Evaluating%20expressions" rel="nofollow noreferrer">documentation</a> and it seems that the IN condition could be used. I'm totally lost here. Any hints? Thanks!</p>