find where something is in a list of strings python code example
Example 1: find string in a list of strings
matching = [s for s in some_list if "abc" in s]
Example 2: python find string in list
list1 = ["a", "b", "c"]
isBInList = "b" in list1 # True