import Queue, threading
q = Queue.Queue()
def fib(n):
a, b = 0, 1
for i in range(0, n):
a, b = b, a + b
q.put((n, a))
return
numeros = [10, 20, 25]
for n in numeros:
t = threading.Thread(target=fib, args = (n,))
t.daemon = True
t.start()
while not q.empty():
n, f = q.get()
print ("{0}: {1}".format(n, f))
aW1wb3J0IFF1ZXVlLCB0aHJlYWRpbmcKCnEgPSBRdWV1ZS5RdWV1ZSgpCgpkZWYgZmliKG4pOgogICAgYSwgYiA9IDAsIDEKICAgIGZvciBpIGluIHJhbmdlKDAsIG4pOgogICAgICAgIGEsIGIgPSBiLCBhICsgYgogICAgcS5wdXQoKG4sIGEpKQogICAgcmV0dXJuCiAgICAgICAgIApudW1lcm9zID0gWzEwLCAyMCwgMjVdCgpmb3IgbiBpbiBudW1lcm9zOgoJdCA9IHRocmVhZGluZy5UaHJlYWQodGFyZ2V0PWZpYiwgYXJncyA9IChuLCkpCgl0LmRhZW1vbiA9IFRydWUKCXQuc3RhcnQoKQoJCndoaWxlIG5vdCBxLmVtcHR5KCk6CgluLCBmID0gcS5nZXQoKQoJcHJpbnQgKCJ7MH06IHsxfSIuZm9ybWF0KG4sIGYpKQo=