Okay, so I am reading a different solution to a problem I had solved. Basically, I have a 2d list of hashes and dots and I want to count hashes in the upper and in the lower part. I don't understand why this program changes the value of 'up' and 'down', in my mind the list named 'fill' should change because it is on the left side of the '='. I understand how the program works, but I don't understand why. Here is the code and an input and output example. (r and s are the numbers of rows and columns, I am interested how the value of 'up' and 'down' changes when it's on the right side (doesn't make sense to me)).
r, s = map(int, input().split())
a=[]
for i in range(r):
a.append(input())
up, down = [0 for j in range(s)], [0 for j in range(s)]
for j in range(s):
fill = up
for i in range(r):
if a[i][j]=="#":
fill[j]+=1
else:
fill = down
input example:
5 8
########
.###..#.
........
#...#...
########
output example:
>>>up
[1, 2, 2, 2, 1, 1, 2, 1]
>>> down
[2, 1, 1, 1, 2, 1, 1, 1]