This is a very important concept in Python where the behavior of pass by value & pass by reference varies with lists compared to immutable data types like strings. Source http://www.python-course.eu/passing_arguments.php Parameter Passing "call by value" and "call by name" The most common evaluation strategy when passing arguments to a function has been call by value and call by reference: Call by Value The most common strategy is the call-by-value evaluation, sometimes also called pass-by-value. This strategy is used in C and C++ for example. In call-by-value, the argument expression is evaluated, and the result of this evaluation is bound to the corresponding variable in the function. So, if the expression is a variable, a local copy of its value will be used, i.e. the variable in the caller's scope will be unchanged when the function returns. Call by Reference In call-by-reference evaluation, which is also known as pass-by-reference, a fun...
Ask Madhukar about Technology, Software or Gadgets !!