queue = []def enQ(): queue.append("A")def deQ(): if len(queue) == 0: print 'Cannot pop from an empty queue!' else: print 'Removed [', 'queue.pop(0)', ']'def viewQ(): print queue # calls str() internallyenQ()viewQ()deQ()viewQ()
Name (required)
email (will not be published) (required)
Website