1) The Stack class is implemented with a peek function to
show the value of the top item without popping it. What is the item
returned at the last peek of the following code?
m = Stack()
m.push(5)
m.push(6)
m.push(7)
a = m.peek()
m.push(a)
m.pop()
m.pop()
m.peek()
1) The Stack class is implemented with a peek function to show the value of the top item without popping it. What is th
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am