Convert while-loop into for-loop

Here we have a working while-loop. But, the same result can be achieved using a for-loop. Convert the while-loop into a for-loop.
result = 0 # change code here...
i = 0 while i < 5: i += 1
result += i print(result) # expected output: 15
Python
Setting up Python environment...
Output