I’d like to know which item python chooses with random.choice so I can use if statements for different outcomes.
thelists = [L1, L2, L3, L4, L5, L6]
theplayers = random.choice(thelists)
I’d like to know which list, L1, L2…, the variable theplayers will refer to.
Have a look at the documentation:
Here,
seqis your list.You can get the index of the selected element with: