Long story short, you can’t just put number in function and expect it to be passed by reference.
- (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”.
CLICK HERE to find out more related problems solutions.