On Wednesday, June 1, 2016 at 2:22:42 AM UTC+12, Fillmore wrote: > ['a','b','c','l'] => 0 # If "l" is in my data I have a zero > ['a','b','c'] => 1 # or a more generic match will do the job
for entry in \ ( ['a','b','c','l'], ['a','b','c'], ) \ : flag = int(not any(m == "l" for m in this_list)) ... # flag is the 1/0 code you’re looking for ... #end for -- https://mail.python.org/mailman/listinfo/python-list