Suppose you have an iterable items
containing items that should be put in a queue q
.
Of course you can do it like this:
for i in items:
q.put(i)
But it feels unnecessary to write this in two lines - is that supposed to be pythonic? Is there no way to do something more readable - i.e. like this
q.put(*items)