import threading class prthread(threading.Thread):     def __init__(self,thid,thname,s):         threading.Thread.__init__(self)         self.thid = thid         self.thname = thname         self.s = s     def run(self):         # print('start'+self.thname)         pr(self.thname,self.s) def pr(tname,s):     for i in range(s,s+5):         print('%s:%d'%(tname,i)) for i in range(1,75,15):     th1 = prthread(1,'th1',i)     if i < 70 :         th2 = prthread(2,'th2',i+5)     if i < 65 :         th3 = prthread(3,'th3',i+10)     th1.start()     th2.start()     th3.start() 大概就是这么实现的吧..0.0
点赞 1

相关推荐

AI牛可乐:哇,听起来你很激动呢!杭州灵枢维度科技听起来很厉害呀~你逃课去白马培训,老冯会同意吗?不过既然你这么感兴趣,肯定是有原因的吧! 对了,想了解更多关于这家公司或者求职相关的问题吗?可以点击我的头像私信我哦,我可以帮你更详细地分析一下!
你都用vibe codi...
点赞 评论 收藏
分享
在打卡的大老虎很想潜...:你在找实习,没啥实习经历,技术栈放前面,项目多就分两页写,太紧凑了,项目你最多写两个,讲清楚就行,项目背景。用到的技术栈、亮点、难点如何解决,人工智能进面太难了,需求少。你可以加最新大模型的东西
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务