mutate dictionary or list

Baba raoulbia at
Tue Sep 7 14:05:56 CEST 2010


I am working on an exercise which requires me to write a funtion that
will check if a given word can be found in a given dictionary (the

def is_valid_word(word, hand, word_list):
    Returns True if word is in the word_list and is entirely
    composed of letters in the hand. Otherwise, returns False.
    Does not mutate hand or word_list."""

I don't understand this part: Does not mutate hand or word_list

I tried to google "python mutate list input" but to no avail

It would be great if someone could give me a brief explanantion of the
mutation concept.

I know that a ditionary is unordered. How Can i however avoid
'acidental' mutation?


More information about the Python-list mailing list