Created
February 18, 2020 23:07
-
-
Save 100daysofdevops/bd561383da45f802a4e192df0a812fe6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Stack(object): | |
def __init__(self): | |
self.items = [] | |
def push(self,item): | |
self.items.append(item) | |
def pop(self): | |
return self.items.pop() | |
def peek(self): | |
return self.items[len(self.items) -1] | |
def isEmpty(self): | |
return self.items == [] | |
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