title: How to Clear or Remove the values from List in Robot Framework
body: <p>I wrote a Testcase, where it will read the login details from excel sheet and for each pair of details it will login and logout.</p>
  
  <p>I am reading data from Excel, each row details i am passing to list and sending that as input to the another keyword/function for login.</p>
  
  <p>After logout, i just want to remove the values in the list, it showed as succeeded but in next run it showed old values also.</p>
  
  <p>I searched, i didn't get any keyword to clear all the list values.</p>
  
  <p>Can one please help me on this. Here the code is:</p>
  
  <pre><code>    *** Settings ***
          Documentation     CLM Registration Test Case
          Test Teardown     Close All Browsers
          Library           Selenium2Library
          Library           Collections
          Library           ExcelLibrary
          Library           String
  
     *** Variables ***
      ${delay}          5s
      ${excelName}      LoginTestData.xls
      @{rowValues}
      ${rowCount}       ${EMPTY}
      ${cellCount}      ${EMPTY}
  
      *** Test Cases ***
      Get Data from Excel
          Open Excel Sheet    ${excelName}
          @{sheetNames}    Get Sheet Names
          ${sheetName}    Set Variable    @{sheetNames}[0]
          ${rowCount}    Get Row Count    ${sheetName}
          ${cellCount}    Get Column Count    ${sheetName}
          : FOR    ${rindex}    IN RANGE    1    ${rowCount}
          \    @{rowValues}    Get Values    ${sheetName}    ${rindex}    ${cellCount}
          \    Log to console    row values are for index ${rindex} : @{rowValues}
          \    Login to the CLM    @{rowValues}
          \    Log    cell count is : ${cellCount}
          \    Change Language to English
          \    Sleep    ${delay}
          \    Logout from CLM
          \    Remove Values    ${rowValues}    ${cellCount}
  
      *** Keywords ***
      Open Excel Sheet
          [Arguments]    ${excelName}
          Open Excel    ${excelName}    useTempDir=False
  
      Get Values
          [Arguments]    ${sName}    ${row}    ${cCount}
          Log to console    user is in Get Values function
          : FOR    ${cindex}    IN RANGE    0    ${cCount}
          \    Log to console    get the data from ${sName}[${cindex}][${row}]
          \    ${cellValue}    Read Cell Data By Coordinates    ${sName}    ${cindex}    ${row}
          \    Insert Into List    ${rowValues}    ${cindex}    ${cellValue}
          [Return]    @{rowValues}
  
      Login to the CLM
          [Arguments]    @{rowValues}
          Open Browser    http://172.20.24.74/clm-ui/#/login/    chrome
          Maximize Browser Window
          Sleep    ${delay}
          Input Text    id=username    @{rowValues}[0]
          Input Password    id=password    @{rowValues}[1]
          Click Button    css=.btn.btn-primary
  
      Remove Values
          [Arguments]    ${rowValues}    ${cellCount}
          Log to console    rowvalues are : ${rowValues} and cell Count: ${cellCount}
          : FOR    ${index}    IN RANGE    0    ${cellCount}
          \    ${value}=    Remove from List    ${rowValues}    -1
          \    Log to console    value removed from list is : ${value}
  
      Change Language to English
          Sleep    ${delay}
          Wait Until Element Is Visible    xpath=//*[@id='top-navbar']/ul[2]/li/a/span[2]    30s
          Click Element    xpath=//*[@id='top-navbar']/ul[2]/li/a/span[2]
          Click Element    xpath=//*[@id='top-navbar']//a[contains(text(),'English')]
  
      Logout from CLM
          Sleep    ${delay}
          Click Element    xpath=//*[@id='top-navbar']/ul[2]/li/a/span[2]
          Click Link    link=Logout
  </code></pre>
  
  <p>In the output it showed as value removed, but next run, it showed old values also</p>
  
  <p>out put as below:</p>
  
  <pre><code>===========================================================================================================
  ReadExcel :: CLM Registration Test Case                                                                    
  ===========================================================================================================
  Get Data from Excel                                                                                user is in Get Values function
  get the data from LoginDetails[0][1]
  get the data from LoginDetails[1][1]
  row values are for index 1 : [u'akurasa', u'Srija210$']
  rowvalues are : [u'akurasa', u'Srija210$'] and cell Count: 2
  value removed from list is : Srija210$
  value removed from list is : akurasa
  user is in Get Values function
  get the data from LoginDetails[0][2]
  get the data from LoginDetails[1][2]
  row values are for index 2 : [u'clmui', u'tecnotree', u'akurasa', u'Srija210$']
  rowvalues are : [u'clmui', u'tecnotree', u'akurasa', u'Srija210$'] and cell Count: 2
  value removed from list is : Srija210$
  value removed from list is : akurasa
  | PASS |
  -----------------------------------------------------------------------------------------------------------
  </code></pre>