Here is my code:
def randomword(length):
allchar = string.ascii_lowercase
keywords =[''.join(random.choice(allchar) for i in range(length))]
return keywords
print(randomword(4))
I didn't get all possible random string with 4 characters.I only get one possible random string,such as ['uuph'].