Is there a way to generate random letters in python (like how we use random.randint to generate random numbers)? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Is there a way to generate random letters in python (like how we use random.randint to generate random numbers)?

Generating random letters in python

4th Dec 2019, 12:44 PM
Simply Code
Simply Code - avatar
1 Answer
+ 1
Look up the random module....in particular "choice". Look up the string module ...there a handful of constants there that will return the alphabet (upper case and/or lowercase).....see how you can combine them with the random choice.
4th Dec 2019, 7:17 PM
rodwynnejones
rodwynnejones - avatar