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
Explain how to redirect the output of a python script from standout(ie., A monitor) on to a file?
How are uuid generated?
Is java better than python?
Why do we need tuples?
How do you create a project in python?
What is a dataframe in python?
How do you show hello world in python?
Which all are the operating system that Python can run on?
How do I share global variables across modules?
What is the script in python?
What do you mean by list comprehension?
Is print a keyword in python?
What is strip in python?
Is string empty python?
What are the disadvantages of the Python programming language?