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 would you check if MySQLdb is installed?
What is python keyword?
Is del the same as remove()? What are they?
Why do we want to use break statement in while-loop?
What is sphinx linux?
How do you upgrade pip?
Explain the use of with statement?
How to check the string consists of alphanumeric characters ?
What is flask-wtf and what are their features?
What are functions in python?
What is head and tail method for data frames in pandas ?
Is string empty python?
What are the rules for global and local variables in python?
What is dogpile effect? How can you prevent this effect?
Which is better PHP or Python?