To pass its parameters to a function, Python uses pass-by-reference.
If you change a parameter within a function, the change reflects in the calling function. This is its default behavior.
However, when we pass literal arguments like strings, numbers, or tuples, they pass by value. This is because they are immutable.
Anmol on Apr 19, 2020 at 02:04 am
This article is contributed by Anmol. If you like dEexams.com and would like to contribute, you can write your article here or mail your article to firstname.lastname@example.org . See your article appearing on the dEexams.com main page and help others to learn.