It would be very, very, very, very, very, very, very, very, very convenient and helpful if we could directly update an element in a list by doing:
L = [1, 2, 3, 4]
L[1] β 2
L is now [2, 2, 3, 4]
It would be very, very, very, very, very, very, very, very, very convenient and helpful if we could directly update an element in a list by doing:
L = [1, 2, 3, 4]
L[1] β 2
L is now [2, 2, 3, 4]
You can simply define a function that substitutes the value at a given position:
https://www.desmos.com/calculator/wdmojthowy
Thanks so much! Thatβs very useful.
I just wish we could do all of this in fewer expressions
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.