I want to make a program where a list adds and remove and item using queue however there were problems in my code that needs to be fixed. Please help me, thank you.
class Queue:
def __init__(self):
self.items = ["Jene Dayao", "MJ Formaran", "Hans Matias", "Candy Santos", "Ian Domingo"]
def view(self):
print (self.items)
def enqueue(self, item):
item = input ("Name of the student: ")
self.items.insert(item)
def dequeue(self):
return self.items.pop()
print ("Student has finished photo taking!")
while True:
print ("School ID Picture Taking Queue")
print ("Select a function...")
print ("")
print ("1. See the student's active list")
print ("2. A student has finished picture taking")
print ("3. Add another student to the list")
option = int(input("Enter your choice: "))
if option == 1:
view ()
elif option == 2:
enqueue ()
elif option == 3:
dequeue ()