import threading
import time

def foo ():
    while True:
        print ("foo")
        time.sleep (0.5)

def main ():
    t = threading.Thread (target = foo)
    t.start ()
    while True:
        print ("main")
        time.sleep (0.3333)

main ()
