Every argument in a Python method is an Object.
All the variables in Python have reference to an Object.
Therefore arguments in Python method are passed by Reference.
Since some of the objects passed as reference are mutable, we can change those objects in a method.
But for an Immutable object like String, any change done within a method is not reflected outside.
Leave a Reply