Example & Tutorial understanding programming in easy ways.

What is Call by value in Python ?

In call by Value, we simply pass some data to the function not pass the reference of some other variable.


Example:

def func(l):

      l[1]=10

      print(l)  // it will print [1,10,3,4]

a=[1,2,3,4]

func(list(a)) 

print(a) // output is [1,2,3,4]

Read More →