This is not great design. For starters it would be less efficient to enumerate the range.
The code you provided would produce the same result as this:
d = {}
for i in range(4):
d[i] = i ** 2
I would recommend trying variations out in the python console. The advantage your code has over this is that it sets up i and v so if you did want to modify either of these in different ways it could make it clear, especially for maths students ( II have seen a whole host of unpythonic things which they do.)