β
Correct Answer: (D)
list(reversed(l))
Explanation: the built-in function reversed() can be used to reverse the elements of a list. this function accepts only an iterable as an argument. to print the output in the form of a list, we use: list(reversed(l)). the output will be: [4,3,2].
Explanation by: Mr. Dubey
the built-in function reversed() can be used to reverse the elements of a list. this function accepts only an iterable as an argument. to print the output in the form of a list, we use: list(reversed(l)). the output will be: [4,3,2].
Discussion
Question Analytics
547
Total Visits
3 y ago
Published
Mr. Dubey
Publisher
92%
Success Rate