In python I'm trying to write nested loops in one line. I've seen a lot of examples, but in all of them the inner iterable variable is different compared to the outer one. So in my case, it won't work. Here's my try:

```
my_list = [for ip in subnet for subnet in subnets]

```

where I'm getting:

```
Unresolved reference 'subnet' 

```