title: Python - invalid syntax for loop
body: <p>I'm having a bit of trouble with a for loop. I get SyntaxEror: invalid syntax line 2 when I try to run the code below:</p>
  
  <pre><code>myList = [[3,5,7,10,47,5,11],[6,23,26,38,39,4,11],[11,27,33,39,44,2,10],[15,19,32,43,45,1,2]]
  for x in myList:
      if x == [3,5,7,10,47,5,11]:
              print 'match'
      else:
          print 'no match'
  </code></pre>
  
  <p>I have used for loops to do loops such as the one below:</p>
  
  <pre><code>animals = ['dog','bear','cat','lion','zebra']
  animals.sort()
  for x in animals:
      if x == 'dog':
          print 'match'
      else:
          print ''
  </code></pre>
  
  <p>and they always seem to work. I have a feeling that maybe the syntax is wrong on the myList variable. I've tried using '' and declaring int but no luck.</p>
  
  <p>The program should assign all the sublists as x and then see if x matches the list i've set and simply tell me whether it's a match or not.</p>
  
  <p>ERROR MESSAGE:</p>
  
  <pre><code>  File "match.py", line 2
      for x in myList:
        ^
  SyntaxError: invalid syntax
  </code></pre>
  
  <p>Any help would be much appreciated.</p>