Up to now I thought that lists can hold element of different types and that each element has its own type information. However, this example seems to suggest something different:

```
def not_working():
    A = B = []
    for x in range(1,30):
        A.append("str")
        B.append(True)
    for a,b in zip(A,B):
        print a + str(b)

```

This result in an error

```
print a + str(b)
TypeError: unsupported operand type(s) for +: 'bool' and 'str'

```

While this works as expected:

```
def working():
    A = []
    B = []
    for x in range(1,30):
        A.append("str")
        B.append(True)
    for a,b in zip(A,B):
        print a + str(b)

```

Note that the only difference is `A = B = []` vs `A = []` and `B = []` in seperate lines. 

Why is the first function broken while the second one works as expected?