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
Mention the rules for local and global variables in python?
What is frozen set in python 3?
What are the arithmetic operators that python supports?
What is thread join in python?
What is anaconda program?
How to convert a number to a string?
What is python? What are the benefits of using python?
Does python has private keyword in python ? How to make any variable private in python ?
How to convert a string into datetime?
What is namespace in Python?
What is polymorphism in python with example?
What does stringvar.strip() does?
Explain split() and join() function.
How are the functions help() and dir() different?
What is dict when we have to use ?