Write a class and implement a list using embedded python list.
Input like : 4 9 3 5
Output should be like: 3 4 5 9
I use this code for taking the input values and split it to the list
s = input()
numbers = map(int, s.split())
How can i build up a class for this listPQ that takes the lists values and put, get and check if the list is empty?
To try if your queue works:
q = ListPQ()
q.put(3)
q.put(4)
x = q.get()
y = q.get()
print(x,y) #it should print 3 4
embedded listexactly, please? double ended queue by any chance?