thelist = [2, 11, 8, 9, 4, 1, 3] items = [2, 4, 5] elements = [x for x in thelist if thelist.index(x) in items] print(elements)