How are arguments passed by value or by reference in Python?
Answer Posted / glibwaresoftsolutions
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
How to sort a dictionary by value in python?
What command do we use to debug a python program?
What is abstraction in python?
What are built in types in python?
What is __init__.py for?
What is the word for 6 times?
What is the usage of help() function in python?
In what language is python written?
Explain try, raise, and finally?
What is numpy logspace?
What flask is and its benefits?
What are the two ways to use python interpreter?
How does xrange work in python?
What is the meaning of @classmethod and @staticmethod ?
Tell me how do you debug a program in python? Is it possible to step through python code?