title: Looping over a list in Python
body: <p>I have a list with sublists in it. I want to print all the sublists with length equal to 3.</p>
  
  <p>I am doing the following in python:</p>
  
  <pre><code>for x in values[:]:
      if len(x) == 3:
          print(x)
  </code></pre>
  
  <p><code>values</code> is the original list. Does the above code print every sublist with length equal to 3 for each value of <code>x</code>? I want to display the sublists where <code>length == 3</code> only once.</p>
  
  <p>The problem is solved. The problem is with the Eclipse editor. I don't understand the reason, but it is displaying only half of my list when I run my loop.</p>
  
  <p>Are there any settings I have to change in Eclipse?</p>