Re: need help with list/variables

2008-12-30 Thread John Machin
On Dec 31, 6:41 am, 5lvqbw...@sneakemail.com wrote: > On Dec 30, 11:31 am, wx1...@gmail.com wrote: > > > I have a list and would like to parse the list appending each list > > item to the end of a variable on a new line. > > > for instance > > > mylist = ['something\n', 'another something\n', 'some

Re: need help with list/variables

2008-12-30 Thread Jonathan Gardner
On Dec 30, 11:41 am, 5lvqbw...@sneakemail.com wrote: > > >>> conc = lambda x,y: x[:] + y # concatenate 2 lists without side effects > >>> mylist = ['something\n', 'another something\n', 'something again\n'] > >>> myvar = reduce(conc, mylist) > >>> print myvar > "conc"? "side effects"? Missing Lisp

Re: need help with list/variables

2008-12-30 Thread Albert Hopkins
On Tue, 2008-12-30 at 11:31 -0800, wx1...@gmail.com wrote: > I have a list and would like to parse the list appending each list > item to the end of a variable on a new line. > > for instance > > mylist = ['something\n', 'another something\n', 'something again\n'] > > then parse mylist to make i

Re: need help with list/variables

2008-12-30 Thread Tim Chase
I have a list and would like to parse the list appending each list item to the end of a variable on a new line. for instance mylist = ['something\n', 'another something\n', 'something again\n'] then parse mylist to make it appear in my variable in this format: myvar = """ something another som

Re: need help with list/variables

2008-12-30 Thread 5lvqbwl02
On Dec 30, 11:31 am, wx1...@gmail.com wrote: > I have a list and would like to parse the list appending each list > item to the end of a variable on a new line. > > for instance > > mylist = ['something\n', 'another something\n', 'something again\n'] > > then parse mylist to make it appear in my va