How are arguments passed by value or by reference in Python?
Answer Posted / nashiinformaticssolutions
In Python, arguments are passed by assignment, meaning that the reference to an object is passed to the function. Immutable types (like integers, strings, tuples) behave like "pass-by-value" because their content cannot be modified, while mutable types (like lists, dictionaries) behave like "pass-by-reference" because their content can be modified.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Is python is intended oriented?
Whenever python exists why does all the memory is not de-allocated / freed when python exits?
What is python? What do you understand of pep 8?
What is head and tail method for data frames in pandas ?
How to set the figure title and axes labels font size in matplotlib?
What is the difference between list and tuple?
Difference between python list comprehension vs. Map?
How does python handle memory management?
Why do we use __ init __ in python?
Can you use r in python?
Point out some of the key features of python?
Boolean have 2 possible values. Are there types in python that have 3 possible values?
What tuple means?
What does kwargs mean?
What are the components of python memory manager?