is it possible to create a method that generate a word from a to z ? cause i only know random generate word but what i want was a word that exist using python code
this is the random generate word code i have:
import random
wordLen = random.randint(1, 5)
def get_random_word(wordLen):
word = ''
for i in range(wordLen):
word += random.choice('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz')
print(word)
return word
get_random_word(wordLen)
or is it possible if i have a list of letter like example list= ['a','t','n','s','d','e','x'], then i want to generate real word from this list??