I have this situation:

```
main_list = [12, 10, 30, 10, 11,10, 31]
get_indices = [1, 0, 1, 1, 0, 0, 0]

```

What I want to do is, extract elements from `main_list` according to the boolean value in `get_indices`.
I tried the following but it is not working :

```
result = main_list[bool(get_indices)]
print result
10

```

It should be `12, 30, 10`