I am starting in Python, I cannot understand the assignment operator, for example:
list1 = ["Tom", "Sam", "Jim"] list2 = list1
the above two statements associate "list1" and "list2" with ["Tom", "Sam", "Jim"] , the question is if the statement is as shown below:
list1[1] = "Sam sister" , if the assignment operator is also considered a binding, then list2[1] is still associated with "Sam", the result is that changing list1 does not affect list2 , although Python presents the opposite conclusion, another question is whether list1[1] be considered as a variable like list1 and list2 in python.
Anyone have any suggestions?
source share