Explanation: to pick out only the negative numbers from a given list ‘l’, the correct list comprehension statement would be: [x for x in l if x<0].
Q. Write the list comprehension to pick out only negative integers from a given list ‘l’.
β
Correct Answer: (D)
[x for x in l if x<0]
Explanation by: Mr. Dubey
to pick out only the negative numbers from a given list ‘l’, the correct list comprehension statement would be: [x for x in l if x<0].
Discussion
Question Analytics
984
Total Visits
3 y ago
Published
Mr. Dubey
Publisher
97%
Success Rate