How to pick randomly between two letters in Python

1 Answer

0 votes
import random

random_letter = ('W', 'A')[random.randint(0, 1)]
    
print(random_letter)




'''
run:

A

'''

 



answered Sep 17, 2023 by avibootz
...