

CodePudding user response:
In python list is variable that is to say when you first drawing a graph is not change list_data inside value, list_data binding is the raw data, when performing the function, the function in the body of the assignment statement y=x is also bound to y actual raw data, into after function y is worth to change happened, but list_data also follow so the figure and the former is different, you can print it out and see the value