Re: [Tutor] About using list in a function

2015-09-11 Thread Mark Lawrence
On 10/09/2015 23:46, D Wyatt wrote: Scrambled on gmail here too. Please provide some context when you reply, thanks. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence ___ Tutor m

Re: [Tutor] About using list in a function

2015-09-10 Thread D Wyatt
Scrambled on gmail here too. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] About using list in a function

2015-08-20 Thread Mark Lawrence
On 19/08/2015 18:25, Alan Gauld wrote: On 19/08/15 17:09, Michelle Meiduo Wu wrote: Hi there, I'm trying to use List in a function. But it doesn't work. Here are sample code not work: ---def getResult():ls = []ls= ls.append(100)ls= ls.append(200)

Re: [Tutor] About using list in a function

2015-08-19 Thread Laura Creighton
In a message of Thu, 20 Aug 2015 00:37:17 +0100, Alan Gauld writes: >On 19/08/15 18:25, Alan Gauld wrote: >> On 19/08/15 17:09, Michelle Meiduo Wu wrote: >>> Hi there, >>> I'm trying to use List in a function. But it doesn't work. Here are >>> sample code not work: -

Re: [Tutor] About using list in a function

2015-08-19 Thread Alan Gauld
On 19/08/15 18:25, Alan Gauld wrote: On 19/08/15 17:09, Michelle Meiduo Wu wrote: Hi there, I'm trying to use List in a function. But it doesn't work. Here are sample code not work: ---def As you can (hopefully!) see above, this message is completely scramb

Re: [Tutor] About using list in a function

2015-08-19 Thread Marc Tompkins
On Wed, Aug 19, 2015 at 11:36 AM, Emile van Sebille wrote: > On 8/19/2015 11:20 AM, Marc Tompkins wrote: > >> (Every couple of weeks, despite my repeated >> attempts to stop TBird from auto-updating, I find that they've got a new >> version and can't connect. Fortunately Mozilla hasn't changed t

Re: [Tutor] About using list in a function

2015-08-19 Thread Emile van Sebille
On 8/19/2015 11:20 AM, Marc Tompkins wrote: (Every couple of weeks, despite my repeated attempts to stop TBird from auto-updating, I find that they've got a new version and can't connect. Fortunately Mozilla hasn't changed their DB format, so I can just re-install 33.) Anyway, I know why _they_

Re: [Tutor] About using list in a function

2015-08-19 Thread Marc Tompkins
On Wed, Aug 19, 2015 at 10:25 AM, Alan Gauld wrote: > On 19/08/15 17:09, Michelle Meiduo Wu wrote: > >> Hi there, >> I'm trying to use List in a function. But it doesn't work. Here are >> sample code not work: ---def >> getResult():ls = []ls= ls.append(

Re: [Tutor] About using list in a function

2015-08-19 Thread Laura Creighton
Scrambled in the archives, too https://mail.python.org/pipermail/tutor/2015-August/106528.html And looks like something thought it would be best as only one line of text. Laura ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription

Re: [Tutor] About using list in a function

2015-08-19 Thread Laura Creighton
In a message of Wed, 19 Aug 2015 18:25:56 +0100, Alan Gauld writes: >On 19/08/15 17:09, Michelle Meiduo Wu wrote: >> Hi there, >> I'm trying to use List in a function. But it doesn't work. Here are sample >> code not work: ---def getResult():ls >> = []l

Re: [Tutor] About using list in a function

2015-08-19 Thread Alan Gauld
On 19/08/15 17:09, Michelle Meiduo Wu wrote: Hi there, I'm trying to use List in a function. But it doesn't work. Here are sample code not work: ---def getResult():ls = [] ls= ls.append(100)ls= ls.append(200) return ls reList = []reList = getR

Re: [Tutor] About using list in a function

2015-08-19 Thread Steven D'Aprano
On Thu, Aug 20, 2015 at 03:05:53AM +1000, Steven D'Aprano wrote: > Hi Michaelle, and welcome. Oops, sorry for the typo, I meant Michelle. -- Steve ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.pyth

Re: [Tutor] About using list in a function

2015-08-19 Thread Steven D'Aprano
Hi Michaelle, and welcome. On Wed, Aug 19, 2015 at 12:09:15PM -0400, Michelle Meiduo Wu wrote: > Hi there, I'm trying to use List in a function. But it doesn't work. > Here are sample code not work: > --- > def getResult(): > ls = [] > ls = ls.appe

[Tutor] About using list in a function

2015-08-19 Thread Michelle Meiduo Wu
Hi there, I'm trying to use List in a function. But it doesn't work. Here are sample code not work: ---def getResult():ls = [] ls= ls.append(100)ls= ls.append(200) return ls reList = []reList = getResult()lsLength = len(reList)print '\n The leng