Re: list of the lists - append after search

2017-03-05 Thread gvmcmt
On Thursday, March 2, 2017 at 9:33:14 PM UTC+5:30, Andrew Zyman wrote: > Hello, > please advise. > > I'd like search and append the internal list in the list-of-the-lists. > > Example: > ll =[ [a,1], [b,2], [c,3], [blah, 1000] ] > > i want to search for the internal [] based on the string fi

Re: list of the lists - append after search

2017-03-03 Thread Andrew Zyman
On Thursday, March 2, 2017 at 3:53:25 PM UTC-5, Andrew Zyman wrote: > On Thursday, March 2, 2017 at 3:31:36 PM UTC-5, Jussi Piitulainen wrote: > > Andrew Zyman writes: > > > > > On Thursday, March 2, 2017 at 2:57:02 PM UTC-5, Jussi Piitulainen wrote: > > >> Peter Otten <__pete...@web.de> writes: >

Re: list of the lists - append after search

2017-03-02 Thread Andrew Zyman
On Thursday, March 2, 2017 at 3:31:36 PM UTC-5, Jussi Piitulainen wrote: > Andrew Zyman writes: > > > On Thursday, March 2, 2017 at 2:57:02 PM UTC-5, Jussi Piitulainen wrote: > >> Peter Otten <__pete...@web.de> writes: > >> > >> > Andrew Zyman wrote: > >> > > >> >> On Thursday, March 2, 2017 at 1

Re: list of the lists - append after search

2017-03-02 Thread Jussi Piitulainen
Andrew Zyman writes: > On Thursday, March 2, 2017 at 2:57:02 PM UTC-5, Jussi Piitulainen wrote: >> Peter Otten <__pete...@web.de> writes: >> >> > Andrew Zyman wrote: >> > >> >> On Thursday, March 2, 2017 at 11:27:34 AM UTC-5, Peter Otten wrote: >> >>> Andrew Zyman wrote: >> >>> . >> >>> .

Re: list of the lists - append after search

2017-03-02 Thread Andrew Zyman
On Thursday, March 2, 2017 at 2:57:02 PM UTC-5, Jussi Piitulainen wrote: > Peter Otten <__pete...@web.de> writes: > > > Andrew Zyman wrote: > > > >> On Thursday, March 2, 2017 at 11:27:34 AM UTC-5, Peter Otten wrote: > >>> Andrew Zyman wrote: > >>> . > >>> . > >>> > End result: > >>> > ll

Re: list of the lists - append after search

2017-03-02 Thread Jussi Piitulainen
Peter Otten <__pete...@web.de> writes: > Andrew Zyman wrote: > >> On Thursday, March 2, 2017 at 11:27:34 AM UTC-5, Peter Otten wrote: >>> Andrew Zyman wrote: >>> . >>> . >>> > End result: >>> > ll =[ [a,1], [b,2], [c,3], [blah, 1000, 'new value'] ] >>> >>> >>> outer = [["a", 1], ["b", 2]

Re: list of the lists - append after search

2017-03-02 Thread Peter Otten
Andrew Zyman wrote: > On Thursday, March 2, 2017 at 11:27:34 AM UTC-5, Peter Otten wrote: >> Andrew Zyman wrote: >> . >> . >> > End result: >> > ll =[ [a,1], [b,2], [c,3], [blah, 1000, 'new value'] ] >> >> >>> outer = [["a", 1], ["b", 2], ["c", 3], ["blah", 1000]] >> >>> for inner in out

Re: list of the lists - append after search

2017-03-02 Thread Andrew Zyman
On Thursday, March 2, 2017 at 11:27:34 AM UTC-5, Peter Otten wrote: > Andrew Zyman wrote: > . > . > > End result: > > ll =[ [a,1], [b,2], [c,3], [blah, 1000, 'new value'] ] > > >>> outer = [["a", 1], ["b", 2], ["c", 3], ["blah", 1000]] > >>> for inner in outer: > ... if inner[0] == "b

Re: list of the lists - append after search

2017-03-02 Thread Peter Otten
Andrew Zyman wrote: > Hello, > please advise. > > I'd like search and append the internal list in the list-of-the-lists. > > Example: > ll =[ [a,1], [b,2], [c,3], [blah, 1000] ] > > i want to search for the internal [] based on the string field and, if > matches, append that list with a va

list of the lists - append after search

2017-03-02 Thread Andrew Zyman
Hello, please advise. I'd like search and append the internal list in the list-of-the-lists. Example: ll =[ [a,1], [b,2], [c,3], [blah, 1000] ] i want to search for the internal [] based on the string field and, if matches, append that list with a value. if internal_list[0] == 'blah':