This algorithm searches for more than one element in a list. The input is a list that you want to search through and a list of elements that you want to search for. The output is a multidimensional list with the positions of the elements you are searching for in the search list in the order that you listed them.
find = lambda searchList, elem: [[i for i, x in enumerate(searchList) if x == e] for e in elem]
I would like to acknowledge especially Andrey Telnov for rewriting the loop and introducing me into 1 line for loops and I would like to acknowledge Seung-jin Kim for introducing me to the lambda function and helping to make my primeList algorithm only one line.
Returns: [[0, 2], , [5, 6, 7]]