I need to search a list of lists for the phrase "ss".
The problem is, it could be capitalised in any way.
With a normal list, I know that I could create a for loop, and use str.lower()
For itertools, it's less simple. There's no .lower attribute. Here's the code so far:
return(ss in (itertools.chain.from_iterable(result))
Does anybody know a way that I can search this while ignoring case?
You may use
any()
in this case as:OR, you may explicitly make a check for each word without using any as: