append method

水静流深 1248283536 at qq.com
Wed May 23 08:23:10 EDT 2012


>>> s=[1,2,3]
 >>> s.append(5)
 >>> s
 [1, 2, 3, 5]
 >>> s=s.append(5)
 >>> s
 >>> print s
 None

why can't  s=s.append(5)  ,what is the reason?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120523/2e1720ff/attachment.html>


More information about the Python-list mailing list