I\'m not sure if I need a lambda, or something else. But still, I need the following:
I have an array = [1,2,3,4,5]. I need to put this array, for insta
array = [1,2,3,4,5]
The keyword you're looking for is list comprehensions:
>>> x = [1, 2, 3, 4, 5] >>> y = [2*a for a in x if a % 2 == 1] >>> print(y) [2, 6, 10]