Re: something go wrongly

2012-07-08 Thread Lefavor, Matthew (GSFC-582.0)[MICROTEL LLC]
Code 699.0/Org Code 582.0 matthew.lefa...@nasa.gov (301) 614-6818 (Desk) (443) 758-4891 (Cell) From: levi nie To: "python-list@python.org" Subject: Re: something go wrongly Thanks, Such methods return None to emphasize that they do not create new lists. i got it. 2012/7/8 Chris

Re: something go wrongly

2012-07-07 Thread levi nie
Thanks, Such methods return None to emphasize that they do not create new lists. i got it. 2012/7/8 Chris Rebert > On Sat, Jul 7, 2012 at 10:23 AM, levi nie wrote: > > my code: > > > > aList=[1,2,3,4,5,6,7,8,9,10] > > xList=[1,2,3] > > print "now aList is",aList.extend(xList) > > > > output: > >

Re: something go wrongly

2012-07-07 Thread Chris Rebert
On Sat, Jul 7, 2012 at 10:23 AM, levi nie wrote: > my code: > > aList=[1,2,3,4,5,6,7,8,9,10] > xList=[1,2,3] > print "now aList is",aList.extend(xList) > > output: > now aList is None > > what i want is [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3] See http://stackoverflow.com/a/1682601 list.extend(),

something go wrongly

2012-07-07 Thread levi nie
my code: aList=[1,2,3,4,5,6,7,8,9,10] xList=[1,2,3] print "now aList is",aList.extend(xList) output: now aList is None what i want is [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3] -- http://mail.python.org/mailman/listinfo/python-list