排版报错,截个图吧。
import random
def getRandom():
myflag=1
while(myflag):
numList=random.sample(range(0, 100), 3)
if(numList[0]+numList[1]+numList[2]>100):
myflag=0
return numList
import random
while True:
a=random.randint(0,100)
b=random.randint(0,100)
c=random.randint(0,100)
if a+b+c>100:
break
else:
pass