#!/usr/bin/env python import sys import threading import random import time import math def genLotto(): a=0 list=[] glist=[] random.seed(time.time()*random.gauss(random.random()*math.sqrt(math.pi),time.time()*math.pi)) for i in range(1,2): while a < 6: list.append(int(random.random()*60)) a=a+1 glist.append(list) return glist def prtLottoNum(): num = genLotto() print num def main(): t1 = threading.Thread(name="m1", target=genLotto) t1 = threading.Thread(name="m1", target=prtLottoNum) t2 = threading.Thread(name="m2", target=genLotto) t2 = threading.Thread(name="m2", target=prtLottoNum) t1.start() time.sleep(1) t2.start() main()