from itertools import compress
arr = np.array([x=='TRUE' for x in xList]) # Turn a string list to boolean
list(compress(yList, arr))
Source:
https://www.geeksforgeeks.org/python-itertools-compress/
from itertools import compress
arr = np.array([x=='TRUE' for x in xList]) # Turn a string list to boolean
list(compress(yList, arr))
Source:
https://www.geeksforgeeks.org/python-itertools-compress/