What will be the output for the given python code?

import collections
dq = collections.deque([4, 5, 6,7,8])
dq.reverse()
print(list(dq))

1
[8, 7, 6, 5, 4]
2
[7, 8, 4, 5, 6]
3
[5, 6, 7, 8, 4]
4
[8, 4, 5, 6, 7]

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation