How to pass arguments by reference in a Python function?

PythonServer Side ProgrammingProgramming

For the given code we the following output

  b = ['10', '20']
  a = ['10', '20']

Explanation:

This indicates that the variable "a" was passed by reference because the function alters its value in the main script.

raja
Published on 07-Dec-2017 12:04:25
Advertisements