how arguments are passed by value or by reference ?

Last updated:9/15/2020 9:01:30 PM

2 Answers

Prakash nidhi Verma
Prakash nidhi Verma

An object oriented language which that all variables hold references to their objects in Python. The references values execute are according to the given functions and as a following result the value of references can't be changed. and the objects can be changed if it is mutable.

def function(my_dict): 
    my_dict['a'] = 1
d = {}
print d
# {'a': 1}