Skip to content

Instantly share code, notes, and snippets.

@Clivern
Created March 21, 2021 18:38
Show Gist options
  • Save Clivern/01df47739318634f120545e14db2b545 to your computer and use it in GitHub Desktop.
Save Clivern/01df47739318634f120545e14db2b545 to your computer and use it in GitHub Desktop.
Python Queue
class Queue():
def __init__(self):
self.queue = []
def enqueueCharacter(self, char):
self.queue.insert(0, char)
def dequeueCharacter(self):
return self.queue.pop()
def __repr__(self):
return str(self.queue)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment