Explain about python’s parameter passing mechanism?



Explain about python’s parameter passing mechanism?..

Answer / Dharmendra Yadav

In Python, arguments can be passed to functions in two ways: by value and by reference. By default, Python passes arguments by object reference (call by object), meaning the function receives a reference or address of the object, not a copy of it. However, for numeric types like integers and floating-point numbers, Python behaves as if they are passed by value because these types are immutable in Python.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Python Interview Questions

How to check if string A is substring of string B?

1 Answers  


What is a function for flatten an irregular list of lists?

1 Answers  


What is polymorphism in python?

1 Answers  


What are “special” methods in python?

1 Answers  


Is there any equivalent to scanf() or sscanf()?

1 Answers  


Can you learn python with no experience?

1 Answers  


Is python numpy better than lists?

1 Answers  


1 What is Python?

1 Answers  


What is reindexing in pandas?

2 Answers  


What is json? Describe in brief how you’d convert json data into python data?

1 Answers  


Tell us something about python iterators.

1 Answers  


How will you uit the python?

1 Answers  


Categories