You can download this code by clicking the button below.
This code is now available for download.
This function generates a random string of lowercase letters of a specified length.
Technology Stack : random, string
Code Type : Generate random strings
Code Difficulty :
def random_word(length):
import string
import random
letters = string.ascii_lowercase
return ''.join(random.choice(letters) for i in range(length))