What Will Be The Output Of The Following Python List #422
What will be the output of the following Python list comprehension?</p> <pre><code class="language-python">[j for i in range(2,8) for j in range(i*2, 50, i)]</code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs109 Python. It can also be found in gs gs109 List Comprehension - Python List Comprehension - Quiz No.1.
What will be the output of the following Python list comprehension?
[j for i in range(2,8) for j in range(i*2, 50, i)]
A list of prime numbers up to 50
A list of numbers divisible by 2, up to 50
A list of non prime numbers, up to 50
Error