My understanding is that if I use a variable in a function without an assignment statement in the function, it will look "outside" the function for the variable.
This seems to be the case with a list, but not a simple variable.
In the following code I am told that the statement "aa += 1 contains an unresolved reference "aa", but the reference to bb[0] is just fine. Why is that?
aa = 0
bb = [9, 7]
def bbtest():
aa += 1
bb[0] += 1