PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import time
import random
chairs = ['a', 'b', 'c', 'd', 'e']
lenght = len(chairs)
while lenght > 1:
time.sleep(1) # set a pause between rounds
print (chairs)
rand_chair = random.randint(0, lenght - 1)
chairs.remove(chairs[rand_chair])
lenght -= 1
print (chairs)
print ("The winner is: " + str(chairs))
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run