Page 1 of 1

What will be the output of the following Python list comprehension?

Posted: Wed Jul 13, 2022 7:45 pm
by answerhappygod
[j for i in range(2,8) for j in range(i*2, 50, i)]
a) A list of prime numbers up to 50
b) A list of numbers divisible by 2, up to 50
c) A list of non prime numbers, up to 50
d) Error