How does Python pass arguments - value or reference? What is a Python decorator? Write a Python function that receives an integer n and outputs the list of squares of numbers from 1 to n.
Anonym
The real answer is delicate - Python passes arguments by "object reference", meaning that you can mutate it by applying its internal methods and as long as you don't use assign operation on it, at which point it will become a reference to an object in a local scope. I didn't distinguish myself at this part of the interview.