标签: python-3.x random
x = random.randint(1,100) y = random.randint(1,100)
myList = [x,y] newNumber = random.randint(x,y)
但是......
myList = [(nsmallest(2,guesses,key = lambda x:abs(x-number)))]
我不知道这些数字是什么,以及如何使用它们作为参数(x,y)来确定newNumber
答案 0 :(得分:0)
"Unpacking Argument Lists"
random.randint(*myList)