import random
choices = [random.randint(1, 10) for i in range(10)]
negative = choices
for ix, value in enumerate(negative):
if value > 3 and value < 8:
negative[ix] = -value
print(negative)
用Python自带的TK库就可以实现哦