Write The List Comprehension To Pick Out Only Negative Integers #426
Write the list comprehension to pick out only negative integers from a given list ‘l’.
This multiple choice question (MCQ) is related to the book/course gs gs109 Python. It can also be found in gs gs109 List Comprehension - Python List Comprehension - Quiz No.2.
Write the list comprehension to pick out only negative integers from a given list ‘l’.
[x<0 in l]
[x for x<0 in l]
[x in l for x<0]
[x for x in l if x<0]