title: How does TCL compare the lists?
body: <p>I have the lists below:</p>
  
  <pre><code>list1 = "a b c"
  list2 = "a b c d e f"
  </code></pre>
  
  <p>I am using the commands below to check if any element of list2 is present in list1. How does TCL compare the two lists? What is the value of the index used for the foreach loop below? Is it 3 (list1) or 6 (list2)?</p>
  
  <pre><code>    foreach list_1 $list1 list_2 $list2  {
          if {$list1 == $list2} {
               set FAIL 1
               break
             } else {
               set FAIL 0
                   break
             }
              }
  </code></pre>
  
  <p>Thanks.</p>