Explanation: the required list comprehension will print a whole number, less than 20, provided that the number is even. since the output list should contain zero as well, the answer to this question is: [x for x in range(0, 20) if (x%2==0)].
Q. , x is even} (including zero)
β
Correct Answer: (D)
[x for x in range(0, 20) if (x%2==0)]
Explanation by: Mr. Dubey
the required list comprehension will print a whole number, less than 20, provided that the number is even. since the output list should contain zero as well, the answer to this question is: [x for x in range(0, 20) if (x%2==0)].
Discussion
Question Analytics
284
Total Visits
2 y ago
Published
Mr. Dubey
Publisher
88%
Success Rate