Python lists not working properly
Question: 
    import random
    
    words = ["Football" , "Happy" ,"Sad", "Love", "Human"]
    
    for word in words:
        word = random.choice(words)
        print(word)
        words.remove(word)
    

Why does the above code only print out 3 words instead of all 5? Am I trying
to achieve printing the words from `words`in a random order in an incorrect
way?


Answer: You can't modify a list (by adding or removing elements) while iterating over
it, the behaviour is undefined. Here's a possible alternative for what you're
doing that doesn't have that problem:

    
    
    random.shuffle(words)
    for word in words:
        print(word)
    

