On Sep 7, 7:05 am, Baba wrote:
> Hi
>
> 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
> hand).
>
> def is_valid_word(word, hand, word_list):
> """
> Returns True if word is in the word_list and is
On 7 sep, 16:46, Ben Finney wrote:
> de...@web.de writes:
> > Objects can be mutable or immutable. For example, in Python, integers,
> > strings, floats and tuples are immutable. That means that you can't
> > change their value.
>
> Yes. Importantly, wherever you see code that you *think* is chang
de...@web.de writes:
> Objects can be mutable or immutable. For example, in Python, integers,
> strings, floats and tuples are immutable. That means that you can't
> change their value.
Yes. Importantly, wherever you see code that you *think* is changing the
value of an immutable object, you're t
Baba writes:
> Hi
>
> 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
> hand).
>
> def is_valid_word(word, hand, word_list):
> """
> Returns True if word is in the word_list and is entirely
> co
Baba a écrit :
Hi
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
hand).
def is_valid_word(word, hand, word_list):
"""
Returns True if word is in the word_list and is entirely
composed of letter
On 7 September 2010 22:05, Baba wrote:
>
> It would be great if someone could give me a brief explanantion of the
> mutation concept.
>
In this case, to mutate is to change. If you must not mutate the list, you
must not change it.
In another words, reading from the list is fine. Writing to it i
Hi
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
hand).
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. Ot