I just started to teach myself Python, and I wanted to search an large array of strings for a couple of keywords. I tried using nested if statements but it's clunky and doesn't work.
Is there a easier way to do this? By the way, my array of strings is called tmp.
for i in range(0, len(idList)):
for j in range(0, len(tmp)):
if "apples" in tmp[j]:
if "bananas" in tmp[j]:
if "peaches" in tmp[j]:
if "pears" in tmp[j]:
*Do something*
setcomparison,