How to change string or number passed as argument?

Peng Yu pengyu.ut at gmail.com
Sat Sep 19 21:59:21 EDT 2009


Hi,

I know that strings or numbers are immutable when they passed as
arguments to functions. But there are cases that I may want to change
them in a function and propagate the effects outside the function. I
could wrap them in a class, which I feel a little bit tedious. I am
wondering what is the common practice for this problem.

Regards,
Peng



More information about the Python-list mailing list