Home / Engineering / Problem Solving and Python Programming / Question

M

Mr. Dubey • 51.17K Points
Coach

Q.) 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]
Correct answer : Option (D) - [3, 1, 25, 5, 20, 5, 4, 3]

Explanation:
 execute in the shell to verify.

Share

Discusssion

Login to discuss.