Ran into the following problem. It's probably a simple solution, and has probably been asked here before, but I couldn't find it.
def a():
liA = []
def b():
for i in liA:
i += 1
liB = generateList()
for i in liB:
i -= 1
liA = liB
def generateList():
return [1,2,3,4]
b()
a()
UnboundLocalError: local variable 'liA' referenced before assignment