. Given a list of N numbers in Python, write a single list comprehension to produce a new list that only contains those values that are: (a) even numbers, and (b) from elements in the original list that had even indices code example

Example: Given a list of numbers, write a list comprehension that produces a list of only the positive numbers in that list. Eg:- input = [-2, -1, 0, 1, 2] Output = [1,2]

Given a list of numbers, write a list comprehension that
produces a list of only the positive numbers in that
list.
Eg:- input = [-2, -1, 0, 1, 2]
Output = [1,2]

Tags:

Misc Example