On 7 sep, 16:46, Ben Finney ben+pyt...@benfinney.id.au 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
On Sep 7, 7:05 am, Baba raoul...@gmail.com 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
On 7 September 2010 22:05, Baba raoul...@gmail.com 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.
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 letters
Baba raoul...@gmail.com 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
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