[Tutor] changing name value with function return

Steven D'Aprano steve at pearwood.info
Tue Oct 30 22:28:03 CET 2012


On 31/10/12 03:56, richard kappler wrote:
> If I have a variable and send it's value to a function to be modified and
> returned, how do I get the function return to replace the original value of
> the variable?


spam = function(spam)


passes the value of "spam" to the function, then assigns the result back to
"spam", replacing whatever value it previously had.


-- 
Steven


More information about the Tutor mailing list