I have a long nested list in which each embedded list can have a different length or elements. I would like to flatten it in order to use each variable as a predictor in my model. The nested list looks like this:

```
  [[u'Burgers',u'Bars'],[u'Local Services', u'Dry Cleaning & Laundry'],[u'Shopping', u'Eyewear & Opticians'],[u'Restaurants'],...]

```

What I would like to achieve is something that I can use as a predictor in a model, especially in sklearn Machine Learning. The elements in the list should be used to predict the interested variable, which is the score. The desired result of the conversion would be like 

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

```

Could someone give me a hand how to make this transformation? I am pretty stuck here. Thank you.