Page 1 of 1

Write the list comprehension to pick out only negative integers from a given list ‘l’.

Posted: Wed Jul 13, 2022 7:44 pm
by answerhappygod
a) [x<0 in l]
b) [x for x<0 in l]
c) [x in l for x<0]
d) [x for x in l if x<0]