Difference between pass by value and reference
• In pass by value a copy of the original value is passed to the function.
• Changes made to the value within the function does not affect the original
value .
• This can be seen when passing immutable objects like integers,strings and
tuples .
• In pass by reference the variable is passed to the function.
• Changes made to the parameter inside the function will affect the original
variable outside the function.
• It can be seen through mutable objects like lists ,dictionaries and sets .