Home »
Python »
Python List MCQs
What will be the output of the following code? | List Que. 24
24. What will be the output of the following code?
l1=[45,56,22,["hello","everyone"]]
l1.reverse() print(l1)
- [ ['hello', 'everyone'], 22, 56, 45]
- [['everyone','hello'], 22, 56, 45]
- [22, 56, 45, ['everyone','hello']]
- [22, 56, 45 ['hello', 'everyone']]
Answer: A) Java
Explanation:
[ ['hello', 'everyone'], 22, 56, 45] will be the output.