## 你好
```
from threadingimport Thread
import threading
def test(a,b):
print('test')
print(a+b,a,b,threading.current_thread())
class myThread (threading.Thread):
def __init__(self, name):
threading.Thread.__init__(self)
self.name = name
def run(self,a,b):
test(a,b)
print ("开始线程:" +self.name,threading.currentThread())
def main():
t=myThread('one')
for in range(5):
a=i+1
b=i+2
t.run(a,b)
main()
```
网友评论