Skip to content

Instantly share code, notes, and snippets.

Created March 1, 2021 06:20
What would you like to do?
class Stack:
def __init__(self):
self.items = []
def is_empty(self):
return self.items == []
def push(self, item):
def pop(self):
return self.items.pop()
def peek(self):
l = len(self.items)-1
return self.items[l]
def size(self):
return len(self.items)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment