A、import math.sin
B、from math import sin
C、import math.*
D、from math import *
A、import math.sin
B、from math import sin
C、import math.*
D、from math import *
import threading import time lock=threading._RLock() words=["a","b","d","b","p","m","e","f","b"] def increase(): global words for count in range(5): lock.acquire() print("A acquired") for i in range(len(words)): for j in range(i+1,len(words)): if words[j] <words[i]: t="words[i]" words[i]="words[j]" words[j] print("a ",words) time.sleep(1) lock.release() def decrease(): global words for count in range(5): lock.acquire() print("d acquired") i range(len(words)): j range(i+1,len(words)): if> words[i]: t=words[i] words[i]=words[j] words[j]=t print("D ",words) time.sleep(1) lock.release() A=threading.Thread(target=increase) A.setDaemon(False) A.start() D=threading.Thread(target=decrease) D.setDaemon(False) D.start() print("The End") 程序结果: A acquired A ['a', 'b', 'b', 'b', 'd', 'e', 'f', 'm', 'p'] The End D acquired D ['p', 'm', 'f', 'e', 'd', 'b', 'b', 'b', 'a'] D acquired D ['p', 'm', 'f', 'e', 'd', 'b', 'b', 'b', 'a'] A acquired A ['a', 'b', 'b', 'b', 'd', 'e', 'f', 'm', 'p'] A acquired A ['a', 'b', 'b', 'b', 'd', 'e', 'f', 'm', 'p'] D acquired D ['p', 'm', 'f', 'e', 'd', 'b', 'b', 'b', 'a'] D acquired D ['p', 'm', 'f', 'e', 'd', 'b', 'b', 'b', 'a'] D acquired D ['p', 'm', 'f', 'e', 'd', 'b', 'b', 'b', 'a'] A acquired A ['a', 'b', 'b', 'b', 'd', 'e', 'f', 'm', 'p'] A acquired A ['a', 'b', 'b', 'b', 'd', 'e', 'f', 'm', 'p'] 你认为结果可能吗?
A、①
B、②
C、③
D、④
为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!