Jan-28-2020, 04:33 AM
pt2 is a pointer to pt1, so they both share the same variable space. (an other name for the same variable)
id one changes since the other does as well since they are really one.
you can use the copy function if you want one to be a copy of and independent of the other.
https://docs.python.org/3/library/copy.h...odule-copy
id one changes since the other does as well since they are really one.
you can use the copy function if you want one to be a copy of and independent of the other.
https://docs.python.org/3/library/copy.h...odule-copy