Skip to content

Instantly share code, notes, and snippets.

@Clivern
Created March 21, 2021 18:38
Show Gist options
  • Save Clivern/90702167570ef7d869b3b79f656c6d5d to your computer and use it in GitHub Desktop.
Save Clivern/90702167570ef7d869b3b79f656c6d5d to your computer and use it in GitHub Desktop.
Python Stack
class Stack():
def __init__(self):
self.stack = []
def pushCharacter(self, char):
self.stack.append(char)
def popCharacter(self):
return self.stack.pop()
def __repr__(self):
return str(self.stack)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment