I have a list of list x which looks like this

```
[[3,6,7,8],
[2,4,5,7],
[4,5,8,10]]

```

and i have another list with 10 elements

```
y=[1,2,3,4,5,6,7,8,9,10]

```

i want to update x based on y so that it look like

```
[[0,0,1,0,0,1,1,1,0,0],
[0,1,0,1,1,0,1,0,0,0],
[0,0,0,1,1,0,0,1,0,1]]

```

my code looks like this

```
newlst3=[]
for x in range(10):
    newlst3.append(0)

for x in newlst:
    newlst3[x]=1

```

my code only does it for a single list but not for a list of lists