iMath wrote:
the container is similar to queue ,but queue doesn't have a sort function
You can use a list as a queue. If you have a list l, then l.append(x) will add an item to the end, and l.pop(0) will remove the first item and return it. Then you just need to check the length of the list before adding an item, and if it's full, do something to process the items first. You can encapsulate all this inside a class if you want, but that's optional. -- Greg -- https://mail.python.org/mailman/listinfo/python-list