Hi People,

I’m having a little trouble figuring out a way to convert this while-loop to a function.

I know how to create functions, but not as far as converting a while-loop to one.

Here’s what I did:

```
def while_loop():
i = 0
numbers = []
while i < 6:
print(f"at the i is {i}")
numbers.append(i)
i = i + 1
print("Numbers now: ", numbers)
print(f"At the bottom i is {i}")
print("The numbers: ")
for num in numbers:
print(num)
while_loop()
```

Please share your examples.

Thanks!