in a python program I have a list that I would like to modify:

```
a = [1,2,3,4,5,1,2,3,1,4,5]

```

Say every time I see 1 in the list, I would like to replace it with 10, 9, 8. My goal is to get:

```
a = [10,9,8,2,3,4,5,10,9,8,2,3,10,9,8,4,5]

```

What's a good way to program this? Currently I have to do a 'replace' and two 'inserts' every time I see a 1 in the list.

Thank you!