On Thursday, June 2, 2016 at 10:07:21 AM UTC+12, MRAB wrote: > What is "this_list"? The main 'for' loop has "entry". Sorry. :) for entry in \ ( ['a','b','c','l'], ['a','b','c'], ) \ : flag = int(not any(m == "l" for m in entry)) ... # flag is the 1/0 code you’re looking for ... #end for