title: Having trouble with generator in list comprehension
body: <p>I am trying to do one liner of one challenge in codefights , but I seem to be stuck with:</p>
  
  <pre class="lang-none prettyprint-override"><code>SyntaxError: Generator expression must be parenthesized if not sole argument
  </code></pre>
  
  <p>when I execute</p>
  
  <pre><code>def magicNumber(n):
      return [i for i in itertools.takewhile
                         (lambda x: x % d for d in [3,5,7] == 0, range(0,n))]
  </code></pre>
  
  <p>The challenge is:  <em>Consider the numbers the only prime factors of which are 3, 5 and 7. Write a program to find the nth largest among them.</em></p>
  
  <p>Example output : </p>
  
  <ul>
  <li>For <code>n = 1</code> the output should be: <code>1 (3^0 * 5^0 * 7^0)</code>.</li>
  <li>For <code>n = 2</code> the output should be: <code>3 (3^1 * 5^0 * 7^0)</code>.</li>
  <li>For <code>n = 6</code> the output should be: <code>15(3^1 * 5^1 * 7^0)</code>.</li>
  </ul>
  
  <p>I know I am far from solving it with this I just want to know what's the problem here.</p>