Question: I don't have the plc connected to an opc server still I want real time data from the plc in any format. I want the timer's ACC data which I have to process on it further. How can I? please give steps of it cuz I'm new user of plc. I have micrologix 1400 plc from allen Bradley.

Answer: 
as a list: 

```
[i for j in xrange(len(l)) for i in itertools.combinations(l, j+1)]

```

or as a generator: 

```
(i for j in xrange(len(l)) for i in itertools.combinations(l, j+1))

```
```
res = []
for L in range(0, len(l)+1):
    for subset in itertools.combinations(l, L):
        res.append(list(subset))

```

Output:

```
[[], [1], [4], [6], [8], [11], [13], [1, 4], [1, 6], [1, 8], [1, 11], [1, 13], [4, 6], [4, 8], [4, 11],....

```