how arguments are passed by value or by reference ?

Total Post:57

Points:285
Python 
 635  View(s)
Ratings:
Rate this:
  1. Post:57

    Points:285
    how arguments are passed by value or by reference ?

    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 = {}
    function(d)
    print d
    # {'a': 1}

  1. Post:1

    Points:5
    how arguments are passed by value or by reference ?

    Post is removed by the Admin.

Answer