Optimize the following code to improve its runtime:
```Python
for x in range(10):
    sum = 0
    for y in range(10):
        sum += y
    print sum
```
Not applicable
sum = 0
for y in range(10):
    sum += y
print sum
for x in range(10):
    print sum