If I had a list of words, e.g.

```
words = ['apple', 'boat', 'cat']

```

And I also had a list of numbers, e.g.

```
num = [1, 2, 0]

```

Is there a way to then sort the first list according to the numbers in the second list? I.e. The index of `'apple'` is `0`, so it should be last in the list, the index of `'boat'` is `1`, so it should be first, etc.