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': ll[ internal_list].append = [ 'new value'] End result: ll =[ [a,1], [b,2], [c,3], [blah, 1000, 'new value'] ] I came up with the following, but the second stmnt is not correct: print [x for x in ll if x[0]== 'blah'] print ll.index([x for x in ll if x[0]=='blah']) output: ValueError: [['blah', 1]] is not in list thank you AZ -- https://mail.python.org/mailman/listinfo/python-list