import threading,time
def auto2():
while 1:
print ("hello master")
time.sleep(2)
def auto1():
while 1:
print "hello"
time.sleep(3)
x=threading.Thread(target=auto1(),args=())
y=threading.Thread(target=auto2(),args=())
x.start()
y.start()
答案 0 :(得分:1)
import threading, time
def auto2():
while 1:
print("hello master")
time.sleep(2)
def auto1():
while 1:
print ("hello")
time.sleep(3)
x = threading.Thread(target=auto1)
y = threading.Thread(target=auto2)
x.start()
y.start()
target = auto1() - >目标= AUTO1