I want to call a function from a function in python. I tried executing this code the out results in a wrong way

This isn’t the exercise from CodeAcademy but another book

Please provide me an answer am I wrong in any logic?

Results continous numbers of ‘0’

If n = 3, then the expected output is

At the top i is 0

Numbers now: [0]

At the bottom i is 1

The numbers:

0

At the top i is 1

Numbers now: [0, 1]

At the bottom i is 2

The numbers:

0

1

At the top i is 2

Numbers now: [0, 1, 2]

At the bottom i is 3

The numbers:

0

1

2

The code is mentioned below

```
def w(n):
i = 0
numbers = []
while i < n:
print "At the top i is %d" % i
numbers.append(i)
#i = i + x
count(i)
print "Numbers now: ", numbers
print "At the bottom i is %d" % i
print "The numbers: "
for num in numbers:
print num
def count(i):
i = i + 1
return i
w(6)
```