[Tutor] Need Explanation...

sunil tech sunil.techspk at gmail.com
Sat Dec 10 08:41:56 CET 2011


*hi,*
*
*
*Consider a list: a = [1,2,3]*
*
*
*& a simple function, which when called it will append 100 to the list.*
*
*
*def app(x):*
*     return x.append(100)*
*
*
*p = app(a)*
*
*
*now list holds appended value [1,2,3,100]*
*but p is empty... why it is?*
*
*
*please teach.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20111210/18934c13/attachment.html>


More information about the Tutor mailing list