Computer >> Computer tutorials >  >> Programming >> Python

How to pass arguments by reference in a Python function?


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.