1.

Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after list1.reverse()?(a) [3, 4, 5, 20, 5, 25, 1, 3](b) [1, 3, 3, 4, 5, 5, 20, 25](c) [25, 20, 5, 5, 4, 3, 3, 1](d) [3, 1, 25, 5, 20, 5, 4, 3]This question was addressed to me in an international level competition.Question is from Lists in division Lists & List Comprehension of Python

Answer»

The correct choice is (d) [3, 1, 25, 5, 20, 5, 4, 3]

Explanation: Execute in the SHELL to VERIFY.



Discussion

No Comment Found

Related InterviewSolutions