PyQueue
A simple module lib to queue your lists!
Usage:
Queue(list, length, input)
Queue(list, length, input).input()
Queue(list, length, input).output()
Queue(list, length, input).infos()
How it works
- Insert the wanted string onto the list if the maximum size of the list is less than the wanted size.
- If the size of the list is greater than the wanted size, pop out the last queue element and insert the wanted string.
TODO:
graph TD
A[Read the input] -->|Verify if the size is less than the wanted|B(Insert string on the first position)
B --> C{Check the queue}
C -->|If the size is less|D[Insert at 0 and move the rest]
C -->|If size is greater|E[Insert at 0 and pop the last]
E --> F
D --> F
F{Rest of args}
F --> |.input|H(print the new element)
F --> |.output|G(print the removed element)
F --> |info / infos|I(print the queue, the input and the output)