Nested Pyramid

Write a function nested_pyramid() that, using nested for loops, creates a string pyramid like the one shown below:

*
**
***
****
*****
import unittest

EXPECTED_PYRAMID = """
*
**
***
****
*****
""".lstrip()


class NestedPyramidTestCase(unittest.TestCase):

    def test_pyramid(self):
        self.assertEqual(nested_pyramid(), EXPECTED_PYRAMID)