β
Correct Answer: (D)
[x for x in l if x<0]
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].
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
1006
Total Visits
3 y ago
Published
Mr. Dubey
Publisher
84%
Success Rate