1.

Suppose list1 = [0.5 * x for x in range(0, 4)], list1 is:(a) [0, 1, 2, 3](b) [0, 1, 2, 3, 4](c) [0.0, 0.5, 1.0, 1.5](d) [0.0, 0.5, 1.0, 1.5, 2.0]I have been asked this question in an internship interview.This question is from Lists topic in portion Lists & List Comprehension of Python

Answer» RIGHT choice is (c) [0.0, 0.5, 1.0, 1.5]

BEST explanation: EXECUTE in the shell to verify.


Discussion

No Comment Found

Related InterviewSolutions