title: In python how do I compare an array/list to a number
body: <pre><code>array = []
  while len(array) &lt; 1000:
      i=2
  if i%array == 0:
      append.array(i)
  i = i + 1
  print array[999]
  </code></pre>
  
  <p>For learning purposes I am trying to find the 1000th prime number. The only problem is I cannot find a way to check whether i is divisible by an element in the array.
      if i%array == 0:
  is not the correct syntax so what is?</p>