+ 1

Is there a way to generate random alphabets?

19th Feb 2016, 6:59 PM
Ajay Pranav
Ajay Pranav - avatar
1 ответ
+ 2
do u mean random letters? If so, you can create a list of letters from a to z and print a random element. Ex. letters=['a','b','c',...'z'] print letters[randint(25)] Or you can simply do: print char(randint(ord('a'),ord('b')) (Remember to use "from random import randint" first)
17th Mar 2016, 9:19 PM
Ayomide Adeoye
Ayomide Adeoye - avatar