what happens if i pass a number variable into a function as reference in python?

Long story short, you can’t just put number in function and expect it to be passed by reference.

In python…

  • (act like) pass by value : whole numbers, strings or tuples
  • (act like) pass by reference : python list

You should visit here for more info about “Pass(call) by Object Reference”.

https://www.geeksforgeeks.org/is-python-call-by-reference-or-call-by-value/

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top