Thanks, All, for the responses.
--
https://mail.python.org/mailman/listinfo/python-list
Larry Martell writes:
> A string and a list go into a bar. The string asks for a cup of
> coffee. The bartender says "We don't have coffee." The string asks for
> a cup of coffee. The bartender says "I told you we don't have coffee."
> The string asks for a cup of coffee. The bartender says to th
On Wed, Jun 13, 2018 at 10:56 PM, Sharan Basappa
wrote:
> The term mutable appears quite often in Python.
> Can anyone explain what is meant by mutable and immutable sequences.
A string and a list go into a bar. The string asks for a cup of
coffee. The bartender says "We don't have coffee." The s
No, it says lists are mutable and tuples are immutable.
Mutable has the same root as "mutation". Mutable means "can be changed in
place". Immutable means "cannot be changed in place".
Examples:
1) pass your list to a function, the function modifies the list. When the
function returns your
Sharan Basappa writes:
> For example, Python lists are mutable.
Yes, that's correct.
> BTW, is the below explanation correct (it is taken from a book I am
> reading)
>
> Python lists are mutable sequences. They are very similar to tuples,
> but they don't have the restrictions due to immutabili
On Thu, Jun 14, 2018 at 12:56 PM, Sharan Basappa
wrote:
> The term mutable appears quite often in Python.
> Can anyone explain what is meant by mutable and immutable sequences.
>
> For example, Python lists are mutable.
>
> BTW, is the below explanation correct (it is taken from a book I am readin
On 06/13/2018 07:56 PM, Sharan Basappa wrote:
The term mutable appears quite often in Python.
Can anyone explain what is meant by mutable and immutable sequences.
Mutable means changeable, and immutible means not mutable, or unchangeable.
For example, Python lists are mutable.
BTW, is the be