we have used many different types in our python programs some of these types are value types including int float and buol when a value type is passed in as an argument to a function a copy is made this is called passing by value changes made to the copy inside the function have no permanent effect in this case a copy of the local variable a is passed into the function for the parameter X changes made to X inside the function do not change the variable a and so a will still be two after the function is executed types like arrays and lists work differently when the elements inside the list are changed in a function the changes are permanent and persist after the function returns these types are called reference types because a reference to the original value is passed into the function not a copy this is called passing by reference in this case a list is created outside of the change function but then a reference to that list is passed into the function for the parameter X now we have two references to the exact same list both a and X refer to the same list changes made to X inside the function persist and so the two at index zero in the list has been replaced for both X and a if you print the list after the function returns you will see that it has been permanently modified now let's take a closer look at those two simple examples a is initialized to the integer value two on line 20 and then we call the ad five function on line 21 the first thing we do inside the ad five function is modify the value for the parameter X by adding five to it and then printing it out we can see that that is seven however when we print a after the ad five function Returns on line 22 we can see that the original value has not been changed a still has a value of two the copy that was modified in the ad five function has no effect on the original variable outside of the function this time we create the list B on line 28 in the program with a single value of two at index0 then when we call the change function the very first thing that it does with the parameter X is modify the value at index0 in the list so that it is 10 and then print it out we can see the result the list contains the single value 10 not two that two has been replaced when we print the original list on line 30 of the main function we can see the same thing because B and X are both references to the same list the changes that we made to X inside of the change function persist after the function returns and we can see that when we print out the variable B