There are several ways to do this.
The simplest way would be to zip the two lists together and use a list comprehension to keep the items you want.
x = [True, False, True, False]
y = ['a', 'b', 'c', 'd']
print([item for keep, item in zip(x, y) if keep])
You can also convert the y array to a numpy array and use the x array to mask the numpy array.
import numpy as np
x = [True, False, True, False]
y = ['a', 'b', 'c', 'd']
print(list(np.array(y)[x]))
Finally, you can create an empty list, iterate through the x and y arrays using their indexes, and append elements in y to the empty list if the corresponding element in x is True.
x = [True, False, True, False]
y = ['a', 'b', 'c', 'd']
temp = []
for index in range(len(y)):
if x[index]:
temp.append(y[index])
print(temp)