<gh_stars>0
"""
This is another sample to generate password.
"""

import random
# Use an import statement at the top

word_file = "words.txt"
word_list = []

#fill up the word_list
with open(word_file,'r') as words:
    for line in words:
        # remove white space and make everything lowercase
        word = line.strip().lower()
        # don't include words that are too long or too short
        if 3 < len(word) < 8:
            word_list.append(word)


def generate_password(): return "".join(random.sample(word_list, 3))
                                                                    
# test your function
print(generate_password())

"""
This is another sample to generate password.
"""

import random
# Use an import statement at the top

word_file = "words.txt"
word_list = []

#fill up the word_list
with open(word_file,'r') as words:
    for line in words:
        # remove white space and make everything lowercase
        word = line.strip().lower()
        # don't include words that are too long or too short
        if 3 < len(word) < 8:
            word_list.append(word)


def generate_password(): return "".join(random.sample(word_list, 3))
                                                                    
# test your function
print(generate_password())
This is another sample to generate password. # Use an import statement at the top #fill up the word_list # remove white space and make everything lowercase # don't include words that are too long or too short # test your function