Is there any way to make sure that my 2 randomly generated items will not be the same? For my current code, sometimes number1
will be the same as number2
.
import random
car_list = [['Toyota', 8], ['Merc', 8], ['BMW', 8], ['Porshe', 8], ['RR', 8]]
number1 = random.choice(car_list)
number2 = random.choice(car_list)
print(number1)
print(number2)