Threading and queue experiment
Single-letter variable names are usually a bad practice, with few exceptions (loop counters, caught exception objects). Importing modules with single-letter names is very silly indeed. So don't do this:


from threading import Thread as T
from Queue import Queue as Q
from random import randint as R



Just stick to good old-fashioned:

from threading import Thread
from Queue import Queue
from random import randint


This is not a very interesting experiment with threading and a Queue. Check out the documentation, it's quite basic but much more interesting, and really using threading and a Queue.