[TriPython] Editing a list in a function
Calvin Spealman
ironfroggy at gmail.com
Wed Aug 11 13:31:51 EDT 2021
On Wed, Aug 11, 2021 at 12:31 PM Mark Hutchinson via TriZPUG <
trizpug at python.org> wrote:
> Once your function begins to 'alter' the input list parameter, it
> becomes
> a new list. Unless your function uses the Global keyword to refer to
> the
> variable in the code outside the function.
> Mark
>
This is absolutely not true. Lists are mutable, modifying them is a
mutation of the original list.
> _______________________________________________
> TriZPUG mailing list
> TriZPUG at python.org
> https://mail.python.org/mailman/listinfo/trizpug
> http://tripython.org is the Triangle Python Users Group
>
--
Read my blog! I depend on your acceptance of my opinion! I am interesting!
http://hub.ironfroggy.com/
Follow me if you're into that sort of thing:
http://www.twitter.com/ironfroggy
-------------- next part --------------
On Wed, Aug 11, 2021 at 12:31 PM Mark Hutchinson via TriZPUG
<[1]trizpug at python.org> wrote:
** **Once your function begins to 'alter' the input list parameter, it
becomes
** **a new list.** Unless your function uses the Global keyword to refer
to the
** **variable in the code outside the function.
** **Mark
This is absolutely not true. Lists are mutable, modifying them is a
mutation of the original list.
**
_______________________________________________
TriZPUG mailing list
[2]TriZPUG at python.org
[3]https://mail.python.org/mailman/listinfo/trizpug
[4]http://tripython.org is the Triangle Python Users Group
--
Read my blog! I depend on your acceptance of my opinion! I am interesting!
[5]http://hub.ironfroggy.com/
Follow me if you're into that sort of thing:
[6]http://www.twitter.com/ironfroggy
References
Visible links
1. mailto:trizpug at python.org
2. mailto:TriZPUG at python.org
3. https://mail.python.org/mailman/listinfo/trizpug
4. http://tripython.org/
5. http://hub.ironfroggy.com/
6. http://www.twitter.com/ironfroggy
More information about the TriZPUG
mailing list