Using list as queue in Python
The humble list can be used as a simple queue in Python. q = [] for i in range( 0, 5 ): q.append( i ) # Add to back of queue while q: # Queue not empty j = q.pop( 0 ) # Get from front of queue print( j...
View ArticleCheck queue of a network printer in Windows
Queue of a network printer I did not know that you could check the queue of documents that are waiting to be printed on a network printer. This is assuming that the computer is using Windows 7 and the...
View ArticleHow to use queue in Python
The ubiquitous list can be used as a queue in Python. But, that is not efficient because of the way lists are implemented. Using deque from the collections module is a straightforward way to use...
View ArticleHow to implement a queue with maximum length in Python
In some applications, you might need to implement a queue that starts off empty, but you want it to grow and be limited to a certain length. Such a queue with a maximum length can be implemented easily...
View Article
More Pages to Explore .....