7th Oct 2021, 7:12 AM
Prabhas Koya
+ 2
First you updated a[0] = 0 then you passed a slice of the list as argument , it's same as passing [2,3,4] and it would do it's task for the given list([2,3,4]) and why would it change in a . Let me explain If you are sending a as argument and you changed something then that would change in a, but if you are sending some other list as argument then why would it change a.
7th Oct 2021, 7:02 AM
Prabhas Koya