import numpy as np
fixedList = ['116','117','114','99','102','101','95']
unorderedList = ['99','116','117']
# isin returns a boolean array of the same shape as element
# that is True where an element of unorderedList is in fixedList and False otherwise.
mask = np.isin(np.array(fixedList), np.array(unorderedList))
#Now form new list using mask
newlist = (np.array(fixedList)[mask]).tolist()
现在新列表包含以下内容
参考
https://docs.scipy.org/doc/numpy/reference/generated/numpy.isin.html