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
What are class or static variables in python programming?
Write a program to convert all strings in list to integers?
What is pycharm used for?
How do you monitor the code flow of a program in python?
Calling an external command in python?
Can we return a string in python?
Write a program to show the singleton pattern used in python.
python is case sensitive ?
How do you copy an object in python?
Is it easier than Django bottle?
How to python script executable on unix?
What is the difference between Xrange and range?
What is sockets? Explain.
What does code coverage mean?
What are the nameless functions in python?