<br>Thanks,<div>Such methods return None to emphasize that they<br>do not create new lists. </div><div>i got it.<br><div class="gmail_quote">2012/7/8 Chris Rebert <span dir="ltr"><<a href="mailto:clp2@rebertia.com" target="_blank">clp2@rebertia.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Sat, Jul 7, 2012 at 10:23 AM, levi nie <<a href="mailto:levinie001@gmail.com">levinie001@gmail.com</a>> wrote:<br>

> my code:<br>
><br>
> aList=[1,2,3,4,5,6,7,8,9,10]<br>
> xList=[1,2,3]<br>
> print "now aList is",aList.extend(xList)<br>
><br>
> output:<br>
> now aList is None<br>
><br>
> what i want is [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3]<br>
<br>
</div></div>See <a href="http://stackoverflow.com/a/1682601" target="_blank">http://stackoverflow.com/a/1682601</a><br>
list.extend(), list.append(), etc. operate in-place, mutating the<br>
existing list object. Such methods return None to emphasize that they<br>
do not create new lists.<br>
<br>
Regards,<br>
Chris<br>
</blockquote></div><br></div>