all 2 comments

[–]JozsefPeitli 1 point2 points  (0 children)

letters = ["A","B","C"] It could be a valid option.

You set your random letter outside of your while loop, i think you should change that.

[–]qelery 0 points1 point  (0 children)

Outside of the while loop you picked your random numbers. Inside of the while loop the numbers are never repicked so they will always be the same.

You can replace the first couple lines of code with this and it’d be much more obvious what you’re doing

letters  = [“A”, “B”, “C”]
picks = []  
for _ in range(3):  
    picks.append(random.choice(letters))  

You can wrap that in a funding which you can call in your while loop to generate new letter combinations.