testStack.Push(5) print(testStack.items) testStack.Push(76) print(testStack.items) # .Pop() print(testStack.Pop()) # .Contains() print(testStack.Contains(5)) print(testStack.Contains(76)) print() #--------------------QUEUE METHODS--------------------# testQueue = Queue() # .Append() testQueue.Append("Dog") testQueue.Append("Cat") testQueue.Append("Turtle") print(testQueue.items) # .Pop() print(testQueue.Pop()) print(testQueue.items) # .Contains() print(testQueue.Contains("Cat")) print(testQueue.Contains("Lizard")) print()
from Stack import Stack from Queue import Queue #Calling Stack and Queue testStack = Stack() testQueue = Queue() #Using push function to create a new list of words testStack.Push("Beenus") testStack.Push("Weenus") testStack.Push("Freenus") #Using append function to create a new list of words testQueue.Append("Rat") testQueue.Append("Snack") testQueue.Append("Borlap") #Testing if the Pop funciton works, # Checking whats in the lest, # Checking if list contains item that was popped, # Checking if list contains item that was not popped, # Checking if list contains item that never existed within it print('Stack Test') print(testStack.Pop()) print(testStack.items) print(testStack.Contains('Beenus')) print(testStack.Contains('Freenus')) print(testStack.Contains('Wack')) print('')