def random_order(some_list):
    order = list(range(len(some_list)))
random.shuffle(order)
for i in order:
    yield some_list[i]
my_list = [1, 2, 3, 4, 5, 6, 7, 8, 9]
for item in random_order(my_list):
    pass
How do I select a random integer from list, different from previous?