0

I can't understand the way value assignment is done in python

In the python challenges, there are some questions where one list (say a) is assigned the value of the another list (b), and then some changes are applied to the first list (a in this case), then the question asks about the value of the second list (in this case). In some cases the value of list b chances according to the changes applied on list a, but sometimes it doesn't. I know this question may be silly, but I can't figure out when to apply the same changes to the second list and when not to. Thank you.

18th Jul 2019, 10:37 PM
Goodbye World 🇱🇧
Goodbye World 🇱🇧 - avatar
1 Odpowiedź
+ 1
Mauricio De Martino if you run the first code example you gave you get a empty list since you make b = a before resigning the value of a
19th Jul 2019, 6:40 AM
Ayden Lee Brownell
Ayden Lee Brownell - avatar