I need to use a while loop with the choice function to terminate when a specific element in a list is randomly selected
I have successfully called the choice() function to select a random element but I get an infinite loop when I try to add a while loop
from random import *
while choice != 3:
choice([1,2,3,4,5,6])
print(choice)
print('damn!')
I get an infinite loop. I need to print all randomly generated numbers that are not the condition for termination of the while loop. When the termination condition is reached a string is displayed and the program terminates